0

I am running a centos vm inside freenas. The vm disc is currently 20G and needs to be increased to 60G. I increased it in freenas (edit zvol in the gui). Then I used gparted from a live cd to extend the partition (sda3 in this case). When I get back into centos. I do not see the increase in the cl-root partition. "lsblk" shows the following structure:

sda           8:0    0   60G  0 disk
├─sda1        8:1    0  200M  0 part /boot/efi
├─sda2        8:2    0    1G  0 part /boot
└─sda3        8:3    0 58.8G  0 part
  ├─cl-root 253:0    0 16.8G  0 lvm  /
  └─cl-swap 253:1    0    2G  0 lvm  [SWAP]

As you can see, the sda3 partition has much more space than the combined cl-root and cl-swap. How do I use this space towards the cl-root?

Thank you

5
  • Okay, but where is the output of pvs, vgs, and lvs? Commented Mar 31, 2018 at 22:55
  • I used lvextend followed by xfs_growfs to increase the logical volume size inside the partition. I still can not wrap my head around this not even on Windows lol Commented Mar 31, 2018 at 23:17
  • Thank you for the fast response @IgnacioVazquez-Abrams :) Commented Mar 31, 2018 at 23:17
  • You can't increase the LV size inside the partition, only inside the VG. Commented Mar 31, 2018 at 23:17
  • The VG was already increased to take the extra space. I wonder if gparted did that Commented Mar 31, 2018 at 23:18

1 Answer 1

0

Although lsblk presented /dev/sda3 with a size of 58.8G, that's the size of the partition, not the LVM physical volume. Thus LVM can't see the additional space. Since the partition is the correct size, there are two things that still need to be resized: the physical volume and the root logical volume:

  1. pvresize /dev/sda3
  2. lvextend -l +100%FREE /dev/c1/root

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.