Moving file systems from one volume group to another

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:379

Moving file systems from one volume group to another
[list=1]
[*]Copy the source logical volume to the desired volume group with the cplv command. For example, where myvg is the new volume group and mylv is the name of the user's logical volume, enter:
cplv -v myvg mylv This will return the name of the new logical volume, such as lv00. If this logical volume was being used for RAW storage, skip to to http://techsupport.services.ibm.com/server/aix.techTips?refNo=90605212014776#step6]step 6. If this is a JFS file system, proceed to step 2. Please note that RAW storage devices should NOT use the first 512 bytes of the RAW device. This is reserved for the LVCB or logical volume control block. cplv will not copy the first 512 bytes of the RAW logical volume, but it will update fields in the new logical volume's LVCB.

[*]All JFS file systems require a log device. This will be a logical volume with a type of jfslog. Run the command lsvg -l <[i]VGNAME> on your destination volume group. If a JFS log DOES NOT already exist on the new volume group, create one by using the mklv and logform commands as detailed below. If a JFS log DOES exist, proceed to http://techsupport.services.ibm.com/server/aix.techTips?refNo=90605212014776#step3]step 3. To make a new JFS log, enter the following command, where myvg is the name of the new volume group, enter:
mklv -t jfslog myvg 1This will return a new JFS log logical volume such as loglv00. This will need to be formatted with the logform command to function as a JFS log. For example:
logform /dev/loglv00Answer yes to destroy.

[*]Change the filesystem to reference a log device that exists in the new volume group and the new logical volume with the chfs command. For example, where myfilesystem is the name of the user's filesystem, enter:
chfs -a dev=/dev/lv00 -a log=/dev/loglv00 /myfilesystem
[*]Run fsck to ensure filesystem integrity. Enter:
fsck -p /dev/lv00
[*]Mount the file system. For example, where myfilesystem is the name of the user's file system, enter:
mount /myfilesystemAt this point, the migration is complete, and any applications or users can now access the data in this filesystem. To change the logical volume name, proceed to the following step.
NOTE: If you receive errors from the preceding step, do not continue. Contact you AIX support center.

[*]Remove the source logical volume with the rmlv command. For example, where mylv is the name of the user's logical volume, enter:
rmlv mylv
[*]Rename and reset any needed attributes on the new logical volume with the chlv or chmod commands. For example, where mylv is the name of the user's logical volume, enter:
chlv -n mylv lv00

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】