Linux - How to reduce a root LVM logical volume

Steps

How to reduce a root LVM logical volume on a default FC3

  • Boot in rescue mode
  • Skip mounting of the system partitions.

Linux Skip Mounting File System

  • Enter the following command
# lvm vgchange -a y
# e2fsck -f /dev/VolGroup00/LogVol00
# resize2fs -f /dev/VolGroup00/LogVol00 10G
# lvm lvreduce -L10G /dev/VolGroup00/LogVol00
  • Verify:
[root@oel11g ~]# lvdisplay
  /dev/hdc: open failed: No medium found
  --- Logical volume ---
  LV Name                /dev/VolGroup00/LogVol00
  VG Name                VolGroup00
  LV UUID                B0EwV0-5XTH-1GLF-LTW2-8q9q-3Ou0-rsggEM
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                10.00 GB
  Current LE             320
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
  • Space
[root@oel11g ~]# df -kh
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      9.7G  2.5G  6.9G  26% /
/dev/sda1              99M   12M   82M  13% /boot
tmpfs                 494M     0  494M   0% /dev/shm
  • get the Logical Volume size
[root@oel11g ~]# lvm lvs
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  LogVol00 VolGroup00 -wi-ao 10.00G
  LogVol01 VolGroup00 -wi-ao  1.94G
  • get the Physical Volume size
[root@oel11g ~]# lvm pvs
  PV         VG         Fmt  Attr PSize  PFree
  /dev/sda2  VolGroup00 lvm2 a-   19.88G 7.94G

Reference







Share this page:
Follow us:
Task Runner