LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Resize space (https://www.linuxquestions.org/questions/linux-newbie-8/resize-space-4175602340/)

ComputerCritic 03-22-2017 02:09 PM

Resize space
 
I am using OpenSUSE Leap. When I try to resize the LVM which is currently 7.84MiB, It shows "The partition /dev/sda8 is in use. It cannot be resized."
Why hasn't anyone else posted this problem online? Am I the first to ask it? What's going on with this error?

MensaWater 03-22-2017 02:49 PM

You're mixing terms and layers.

Resizing a partition is one action.

Resizing in LVM is a series of actions.

Resizing a filesystem is another action.

LVM has 3 levels:
1) Physical Volume (PV) - This can be an entire disk or a partition of the disk.
2) Volume Group - This is a container comprised of one or more PVs.
3) Logical Volume - This is a device created from the VG. Each VG can have multiple LVs.

So the first thing to do is run "vgs" to see which VGs you have.
Run "vgdisplay -v" on each VG you see to see what PVs and LVs it has.

If your VG is comprised of PV sda8 only you'd have to change the size of sda8 using fdisk, parted or other partitioning tool.

Once you've done that you have to do additional steps to make sure the PV sees the new space added then have the VG see the space added to the PV and finally you'd have to lvextend the specific LV you want to increase.

After that you most likely have a filesystem (e.g. ext4) laid out on the LV. You'd have to do a resize on the filesystem (e.g. with resize2fs or resize4fs) so the filesystem saw the space that had been added to the LV.


All times are GMT -5. The time now is 01:20 PM.