1

Topic: Cannot resize (shrink) a partition for version 0.24.0

I booted into my VirtualBox's RedHat 7.2 using 'gparted-live-0.24.0-2-i586.iso'.  The file type I used to build the virtual disk is vmdk.  I defined the disk as 17GB but the physical disk is actually used 7.6GB. 

I wanted to resize the major partition.

After booting up the iso, I chose 'GParted Live (Default settings)'.  Then gparted was executed automatically.

My system has two partitions.  One is /dev/sda1 which contains /boot, with xfs filesystem.  Another one is /dev/sda2, which is lvm, 15Gb in size.

/dev/sda2 is displayed with the following:
Size = 15.51 GiB
Used = 15.47 GiB
Unused = 40.00 MiB

I wanted to shrink /dev/sda2 using 'Resize/Move' function.

I highlighted /dev/sda2 and clicked 'Resize/Move' button.  Here below are the information displayed in the dialog box:

Minimum size: 500 MiB     Maximum size: 500 MiB
Free space preceding (MiB) = 0
New size (MiB) = 500
Free space following (MiB) = 0
Align to = MiB

Questions:

(1)  Why min and max size of /dev/sda2 is 500 MB only?  It is a partitionof 15GB!

(2)  When I changed new size from 500 to 300, and tab to 'free space following', the new size changed back to 500 automatically.  I couldn't manipulate the figures for 'free space preceding', 'new size' and 'free space following'.  Why?

2

Re: Cannot resize (shrink) a partition for version 0.24.0

sam wrote:

(1)  Why min and max size of /dev/sda2 is 500 MB only?  It is a partitionof 15GB!

That does sound odd.  Would you be able to capture a screen shot and post a link to the screen shot in this thread?

sam wrote:

(2)  When I changed new size from 500 to 300, and tab to 'free space following', the new size changed back to 500 automatically.  I couldn't manipulate the figures for 'free space preceding', 'new size' and 'free space following'.  Why?

I'm not sure that I understand this correctly.  Perhaps it is a sympton of (1) above.

Also note that LVM is like a virtual hard drive itself with logical volumes (like partitions) contained within.  Currently GParted can grow or shrink LVM Physical Volumes, but not LVM Logical Volumes.  To free up space within an LVM PV, you would first need to use another tool, such as lvresize to shink a LVM LV.