TITLE : Procedure for reducing the size of a filesystem. OS LEVEL : AIX DATE : 20/12/1999 VERSION : 1.0 ---------------------------------------------------------------------------- In the following example, the /home/ftp filesystem is to be reduced from 100 Meg to 50 Meg in size. Currently the filesystem uses 25 physical partitions of 4 Meg and will be recreated using 12 physical partitions of 4 Meg. df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 12288 4624 63% 1684 21% / /dev/hd2 380928 32840 92% 11277 12% /usr /dev/hd9var 32768 20676 37% 241 3% /var /dev/hd3 36864 25696 31% 337 4% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 103884 49% 2014 4% /home/john /dev/lv01 114688 57912 50% 60 1% /usr/sys/inst.images /dev/ftplv 102400 78464 24% 30 1% /home/ftp /dev/wplv 40960 828 98% 731 8% /usr/wp lslv ftplv LOGICAL VOLUME: ftplv VOLUME GROUP: rootvg LV IDENTIFIER: 000099220070b658.13 PERMISSION: read/write VG STATE: active/complete LV STATE: opened/syncd TYPE: jfs WRITE VERIFY: off MAX LPs: 512 PP SIZE: 4 megabyte(s) COPIES: 1 SCHED POLICY: parallel LPs: 25 PPs: 25 STALE PPs: 0 BB POLICY: relocatable INTER-POLICY: minimum RELOCATABLE: yes INTRA-POLICY: middle UPPER BOUND: 32 MOUNT POINT: /home/ftp LABEL: /home/ftp MIRROR WRITE CONSISTENCY: on EACH LP COPY ON A SEPARATE PV ?: yes 1, Backup the /home/ftp directory to tape :- find /home/ftp -print | cpio -ocBv > /dev/rmt0 2, Unmount the filesystem :- umount /home/ftp 3, Delete the filesystem :- rmfs /home/ftp 4, Recreate the logical volume using less physical partitions. The command below will create a logical volume called ftplv using 12 physical partitions IN THE ROOTVG volume group :- mklv -y ftplv rootvg 12 5, Recreate the filesystem on the new logical volume :- crfs -v jfs -d /dev/ftplv -m /home/ftp -A yes 6, Mount the new filesystem :- mount /home/ftp 7, Restore the data back into the filesystem :- cpio -icvBdum < /dev/rmt0 df -k Filesystem 1024-blocks Free %Used Iused %Iused Mounted on /dev/hd4 12288 4624 63% 1684 21% / /dev/hd2 380928 32840 92% 11277 12% /usr /dev/hd9var 32768 20676 37% 241 3% /var /dev/hd3 36864 25696 31% 337 4% /tmp /dev/hd1 53248 51284 4% 95 1% /home /dev/lv00 200704 103884 49% 2014 4% /home/john /dev/lv01 114688 57912 50% 60 1% /usr/sys/inst.images /dev/wplv 40960 828 98% 731 8% /usr/wp /dev/ftplv 49152 27016 46% 30 1% /home/ftp