Ask Your Question

Can't resize LVM partition

asked 2018-03-13 07:10:51 -0500

MintExists gravatar image

I am attempting to install Fedora Server 27 alongside Fedora Workstation 27. When I installed Fedora Workstation 27 I chose "create them automatically using LVM." Now when I installed Gparted It said the drive was full despite the fact I only had 30GiBS of space used. I used a ubuntu live cd to install something called KVPM and used it to empty some space on the LVM partition. Now back to Fedora Workstation 27, I used Gparted to try and shrink the LVM partition. I got an error and this. What caused it and why won't it work?

edit retag flag offensive close merge delete


Since you are installing Fedora Server you better get used to the command line. Open a terminal and post output of lsblk, pvdisplay, vgdisplay, lvdisplay. You can use fpaste.

fcomida gravatar imagefcomida ( 2018-03-13 08:37:22 -0500 )edit

As far as I know, GParted is not able to deal with LVM.You could use blivet-gui, or follow @fcomida's recommendation above.

florian gravatar imageflorian ( 2018-03-13 08:53:00 -0500 )edit
MintExists gravatar imageMintExists ( 2018-03-13 19:46:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-03-15 00:08:58 -0500

JaffoGLIDE gravatar image

The reason you can't resize the fedora-home logical-volume or the /dev/sda2 pvolume is they are mounted and in use by the running operating system.

To shrink the fedora-home volume it will need to be unmounted. It is possible to do this from the Fedora 27 workstation OS you have installed, but it can be dangerous if you have data on the drive you care about ... it's advanced drive partitioning on a live system, not something for the feint of heart.

I would recommend you use a Live operating system that can work with the physical disks. You mention KVPM, which I am unfamiliar with, but may have all the tools you need. I know the System Rescue CD live-os can do everything you need. I use it all the time for these sorts of problems.

However, there is one big gotcha you are probably facing: the XFS filesystem cannot be reduced in size. Go ahead and google that topic; every hit will tell you that making the existing filesystem smaller is not possible, the commands do not exist in the code.

The only way to achieve the desired end-state is to copy all of the data from the volume to another storage device, delete the fedora-home logical volume, recreate the volume with the smaller desired size, format the new volume filesystem, mount the new volume, and copy the data back to the volume.

It may be easier to rebuilt the Fedora27 Workstation OS with the correct partitioning/volume sizes.

edit flag offensive delete link more



Thank you for that information it worked!

MintExists gravatar imageMintExists ( 2018-03-15 08:53:34 -0500 )edit

Question Tools



Asked: 2018-03-13 07:10:51 -0500

Seen: 1,257 times

Last updated: Mar 15 '18