Re: How to Rezize Partition on LVM
I would like to than everyone for the input. Here is how it was completed:
Boot into GUI mycomp as root
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-0 8.2G 2.9G 4.9G 38% /
udev 10M 0 10M 0% /dev
tmpfs 3.2G 9.2M 3.2G 1% /run
tmpfs 7.9G 68K 7.9G 1% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/sda1 236M 46M 178M 21% /boot
/dev/mapper/mycomp--vg-var 2.7G 351M 2.2G 14% /var
/dev/mapper/mycomp--vg-tmp 360M 2.1M 335M 1% /tmp
/dev/mapper/mycomp--vg-home 427G 136M 405G 1% /home
tmpfs 1.6G 4.0K 1.6G 1% /run/user/118
tmpfs 1.6G 8.0K 1.6G 1% /run/user/0
root@mycomp:~# resize2fs /dev/mapper/mycomp--vg-home 5G
Filesystem at /dev/mapper/mycomp--vg-home is mounted on /home; on-line resizing required
resize2fs: On-line shrinking not supported
Rebooting into command line interface for root worked, the /home partition was not mounted.
---------------------------------------------------------------------------
# lvreduce -L 5G /dev/mapper/mycomp--vg-home
WARNING: Reducing active and open logical volume to 5.00 GiB
THIS MAY DESTROY YOUR DATA (filesystem etc.)
Do you really want to reduce home? [y/n]: y
Size of logical volume mycomp-vg/home changed from 433.32 GiB (110931 extents) to 5.00 GiB (1280 extents).
Logical volume home successfully resized
Reply to: