TITLE : Procedure for moving a filesystem between disks that are in different volume groups using the cplv command. OS LEVEL : AIX 4.x DATE : 25/11/99 VERSION : 1.0 ---------------------------------------------------------------------------- In the following example, an RS6000 has 1 one disk with rootvg on, and has just had a second disk installed. The second disk needs a volume group creating on it and a data filesystem transferring to the new disk. Ensure that you have a full system backup befor you start. lspv hdisk0 00009922faf79f0d rootvg hdisk1 None None df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 8192 1228 86% 1647 41% / /dev/hd2 380928 40984 90% 11014 12% /usr /dev/hd9var 32768 20952 37% 236 3% /var /dev/hd3 28672 1644 95% 166 3% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 110324 46% 1869 4% /home/john /dev/ftplv 102400 94528 8% 32 1% /home/ftp /dev/lv01 114688 58240 50% 59 1% /usr2 In this example the /usr2 filesystem needs to be moved to the new disk drive, freeing up space in the root volume group. 1, Create a data volume group on the new disk (hdisk1), the command below will create a volume group called datavg on hdisk1 with a PP size of 32 Meg:- mkvg -s 32 -y datavg hdisk1 2, Create a jfslog logical volume on the new volume group :- mklv -y datalog -t jfslog datavg 1 3, Initialise the jfslog :- logform /dev/datalog logform: destroy /dev/datalog (y)?y 4, Umount the filesystem that is being copied :- umount /usr2 5, Copy the /usr2 logical volume (lv01) to a new logical volume (lv11) on the new volume group :- cplv -y lv11 -v datavg lv01 cplv: Logical volume lv01 successfully copied to lv11 . 6, Change the /usr2 filesystem to use the new (/dev/lv11) logical volume and not the old (/dev/lv01) logical volume :- chfs -a dev=/dev/lv11 /usr2 7, Change the /usr2 filesystem to use the jfslog on the new volume group (/dev/datalog) :- chfs -a log=/dev/datalog /usr2 8, Mount the filesystem :- mount /usr2 df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 8192 1220 86% 1649 41% / /dev/hd2 380928 40984 90% 11014 12% /usr /dev/hd9var 32768 20952 37% 236 3% /var /dev/hd3 28672 1644 95% 166 3% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 110324 46% 1869 4% /home/john /dev/ftplv 102400 94528 8% 32 1% /home/ftp /dev/lv11 114688 58240 50% 59 1% /usr2 9, Once the filesystem has been checked out, the old logical volume can be removed :- rmfs /dev/lv01 Warning, all data contained on logical volume lv01 will be destroyed. rmlv: Do you wish to continue? y(es) n(o)? y rmlv: Logical volume lv01 is removed. If you wish to copy further filesystems repeat parts 4 to 9.