Movelvfromvgtovg
Movelvfromvgtovg
Movelvfromvgtovg
Task 1 : Ckeck the logical volume and it mount point . In our example we are going to move /my
filesytem from mvg01 to poovg01.
$ df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 0.25 0.20 21% 2514 2% /
/dev/hd2 2.88 0.42 86% 33394 5% /usr
/dev/hd9var 0.25 0.11 58% 4495 7% /var
/dev/hd3 0.12 0.08 34% 375 2% /tmp
/dev/hd1 0.50 0.48 4% 22 1% /home
/proc - - - - - /proc
/dev/hd10opt 0.75 0.26 66% 3996 3% /opt
/dev/lv_admin 0.12 0.12 4% 67 1% /admin
/dev/fslv00 16.00 3.56 78% 31558 4% /sejinstall
/dev/mylv 2.00 2.00 1% 4 1% /my
Task 2 : List the volume group present on the system.
$ lsvg
rootvg
myvg01
poovg01
Task 3 : Identify the Volume Group corresponds to the filesystem and Logical Volume. In this
example mylv is the LV name for filesystme /my and it resides on VG myvg01 .
$ lsvg -l myvg01
myvg01:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
mylv jfs2 8 8 1 open/syncd /my
loglv01 jfs2log 1 1 1 open/syncd N/A
Task 4 : Umount the filesytem .
$umount /my
Task 5 : Copy the mylv to Volume Group poovg1 with new LV name mylvnew.
$ cplv -v poovg01 -y mylvnew mylv
cplv: Logical volume mylv successfully copied to mylvnew .
Task 6: create a jfs2log file with name loglv02.
$ mklv -t jfs2log -y loglv02 poovg01 1
loglv02
Task 7 : Format the log file.
$ logform /dev/loglv02
logform: destroy /dev/rloglv02 (y)?y
Task 8 : Assign the log /dev/loglv02 to the LV /dev/mylvnew.
$ chfs -a dev=/dev/mylvnew -a log=/dev/loglv02 /my
$ lsvg -l myvg01
myvg01:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv01 jfs2log 1 1 1 closed/syncd N/A
Task 14: Verify the mylvnew is present in poovg01.
$ lsvg -l poovg01
poovg01:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
poolv jfs2 8 8 1 closed/syncd N/A
mylvnew jfs2 8 8 1 open/syncd /my
loglv02 jfs2log 1 1 1 open/syncd N/A
By this way we can move a filesystem from VG to VG .