Problem
When data on an AIX system is lost, or if the VG structure is corrupted, it is safest to use mirroring for data recovery after destroying the data area image of Aix. How do I safely do data mirroring under AIX systems before data recovery is operational?
Answer
The tools used are the DD command under AIX, and for the DD command, please refer to:
http://zhangyu.blog.51cto.com/197148/137069
1, first the failure of the LV file system umount down.
2, check whether the root of the/etc/secuity/limits set the size of the transfer limit, the default is 1G, similar to this: Fsize = 2097151 to change him (recommended to back up the original):
Fsize =-1
Core =-1
CPU =-1
data =-1
rss =-1
stack =-1
Nofiles =-1
Fsize_hard =-1
Core_hard =-1
Cpu_hard =-1
Data_hard =-1
Rss_hard =-1
Stack_hard =-1
Nofiles_hard =-1
Of course, in order to balance the resources, DD can then be changed back to the original limits.
After the change, the root user needs to be logged back in order to take effect.
3, if the local disk space is low, you can target DD to NFS space (this can be directly backed up to the PC's Windows or Linux). Mount the Server for NFS, which is roughly ordered:
Mount 10.10.0.1:/nfs/tmp (where 10.10.0.1 is changed to target NFS Ip,/nfs is the share name on Server for NFS)
You can use SHOWMOUNT-E 10.10 0.1来 to view the NFS shared resources and their permissions on the 10.10.0.1 before the mount.
4. Execute DD command:
DD if=/dev/lv01 of=/tmp/data.img bs=1024k (where/DEV/LV01 is the device name of the faulted LV,/tmp/data.img to the generated destination file, all other parameters are by default)
5, look at IO speed, estimated time can be. Better wait for it to do dozens of g no problem, then leave.
6, thanks Soway to provide the suggestion: May add the conv parameter in the DD, in order to handle the bad way. The amended order is as follows: DD if=/dev/lv01 of=/tmp/data.img bs=1024k Conv=noerror,sync
Soway provides references to the role of parameters in Conv:
NoError
Error encountered while copying, skip and Continue execution
Sync
The copy encountered an error, skipping this block may result in the overall position of the subsequent data changes, plus this parameter can be filled with empty data in the target file with the wrong block location of the same parts, to ensure that the file system structure stability.