Tuesday 12 March 2013

AIX:Moving filesystem between volume groups




Step 1) Close the source LV (umount filesystem)

# umount /fs_on_testvg1


Step 2) Copy the source LV to another VG

# cplv -v new_vg -y newname_lv oldname_lv
cplv: Logical volume loglv01 successfully copied to newname_lv .


Step 3) Change filesystem's lv and log device (with these residing on new new_vg).

# chfs -a dev=/dev/newname_lv -a log=/dev/jfslogvg2_lv /fs_on_testvg1


Step 4) Remove old (source) LV.

# rmlv -f oldname_lv


Step 5) Change the LV name: newname_lv to oldname_lv

Syntax:
chlv -n NewLogicalVolume LogicalVolume

I our case:
# chlv -n oldname_lv newname_lv


Step 6) Mount the filesystem

# mount /fs_on_testvg1


No comments:

Post a Comment