Thursday, January 21, 2016

Resizing a Logical Volume on Centos 7.2 with system-storage-manager

My desktop machine at work was setup to dual-boot Ubuntu 14.04 and Windows 10.  Deciding I needed Centos 7.2 much more than Windows 10, I installed Centos into the space that had been occupied by Windows.

Using the Centos 7 installation DVD, I followed the partitioning proceedure that I can now almost do in my sleep, creating the following partitions:
  1. 500 MiB /boot with an xfs file system on an actual partition
  2. 1024 MiB swap
  3. 20 GiB / with an xfs file system on a logical volume
  4. /home with whatever space is left with an ext4 file system on a logical volume
I said I could almost do this in my sleep. I made one huge mistake.  Instead of making the /home partition with GiB, I made it with MiB!  I didn't notice this until I got a warning about the home partition running out of space.  I had spent a lot of time already installing and then updating the system.  I didn't want to go through that again.

So I used this mistake as an opportunity to explore resizing my logical volume.  It took a bit of poking around, but eventually I found this webpage, from which I did the following:
  1. Logged into the GUI as root so that /home would not be in use.
  2. Ran yum install system-storage-manager to install ssm.
  3. Ran ssm list to see my volumes.
  4. Ran ssm resize -s [size] [volume] to make /home larger.
It worked like a charm, and now I'm logged back in with my regular user with a few hundered gigabytes of space in my /home partition.

No comments:

Post a Comment