I want to redirect space from one logical volume to another (they are in the same volume group). I think here are the steps, but I'm not sure, can anyone help me verify and let me know if this is a bad way of doing it? I'm using RHEL6.2 using IBM ECKD DASD.
I need space taken away from /opt and moved to /usr, /tmp, and /var:
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/system_vg-root_lv 4.0G 3.4G 351M 91% /
tmpfs 498M 260K 498M 1% /dev/shm
/dev/mapper/system_vg-boot_lv 93M 25M 64M 29% /boot
/dev/mapper/system_vg-opt_lv 2.0G 35M 1.8G 2% /opt
/dev/mapper/system_vg-tmp_lv 388M 17M 352M 5% /tmp
/dev/mapper/system_vg-usr_lv 2.0G 1.7G 169M 91% /usr
/dev/mapper/system_vg-var_lv 376M 74M 284M 21% /var
I want to move 600 MB out of /opt and distribute it to the afore-mentioned directories.
#fsck -f /opt
#resize2fs -p /dev/system_vg/opt_lv 1.4G
Shring logical volume:
#lvresize -L -600MB /dev/system_vg/opt_lv
Display volume group to see if there is Free PE:
# vgdisplay system_vg
Resize /var logical volume:
# lvresize -L +350MB /dev/system_vg/var_lv
#df -kh .
#resize2fs -p /dev/mapper/system_vg-var_lv
#df -kh .
Repeat for /usr and /tmp
Any feedback will be much appreciated!