0

I have a CentOS VM (on a windows host, managed with virtualbox) that ran out of disk space.

I extended the virtual disk size, then used gparted to assign the new space to the existing partition

Then I used lvextend to assign halves of the free space to /dev/cl/home and /dev/cl/root

However df show that the /dev/mapper/cl-home and /dev/mapper/cl-root haven't grown into the now available space even after a reboot.

What am I missing ? Any tutos I found about extending existing logical volumes considered the job done with lvextend...

df gives :

/dev/mapper/cl-root    39G     37G  1,2G  98% /
/dev/mapper/cl-home    19G     13G  5,7G  70% /home
/dev/sda1             976M    672M  238M  74% /boot

and lsblk :

NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    0  150G  0 disk 
├─sda1        8:1    0    1G  0 part /boot
└─sda2        8:2    0  149G  0 part 
  ├─cl-root 253:0    0   81G  0 lvm  /
  ├─cl-swap 253:1    0  6,4G  0 lvm  [SWAP]
  └─cl-home 253:2    0 61,6G  0 lvm  /home

and lvdisplay

  --- Logical volume ---
  LV Path                /dev/cl/swap
  LV Name                swap
  VG Name                cl
  LV UUID                <redacted>
  LV Write Access        read/write
  LV Creation host, time <redacted>
  LV Status              available
  # open                 2
  LV Size                6,40 GiB
  Current LE             1639
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:1
   
  --- Logical volume ---
  LV Path                /dev/cl/home
  LV Name                home
  VG Name                cl
  LV UUID                <redacted>
  LV Write Access        read/write
  LV Creation host, time <redacted>
  LV Status              available
  # open                 1
  LV Size                <61,57 GiB
  Current LE             15761
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:2
   
  --- Logical volume ---
  LV Path                /dev/cl/root
  LV Name                root
  VG Name                cl
  LV UUID                <redacted>
  LV Write Access        read/write
  LV Creation host, time <redacted>
  LV Status              available
  # open                 1
  LV Size                <81,03 GiB
  Current LE             20743
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     8192
  Block device           253:0
0

1 Answer 1

0

Answer given here : https://unix.stackexchange.com/a/671254/494994

resize2fs (for ext4) or xfs_growfs (for xfs) are used to resize the file system to fully use the logical volume alloted.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.