Suse Enterprise Server 12 - Resize Root partition

1

I have a Suse Enterprise Server 12 installed on a VMware server, I want to be able to increase the root volume, ideal I would like to be able to set it to auto expand. below is the layout.

df -h

Filesystem               Size  Used Avail Use% Mounted on

/dev/mapper/system-root   10G  8.4G  1.1G  89% /

udev                     916M  100K  916M   1% /dev

tmpfs                    916M  112K  916M   1% /dev/shm

/dev/sda1                 61M   43M   15M  75% /boot

John Brines

Posted 2014-06-09T11:10:43.207

Reputation: 21

do you have freespace on the virtual drive, and is it adjascent to the root partition? I see your \ is an encrypted LVM. whats the underlying filesystem? – Frank Thomas – 2014-06-09T12:22:07.623

Yes I have free space on the virtual drive.

Does this info make sense?

Disk /dev/sdb: 16.1 GB, 16111501312 bytes

Device Boot Start End Blocks Id System /dev/sdb1 128 25174143 12587008 8e Linux LVM

Device Boot Start End Blocks Id System /dev/sda1 * 128 128639 64256 83 Linux

Disk /dev/mapper/system-root doesn't contain a valid partition table

Disk /dev/mapper/system-swap doesn't contain a valid partition table – John Brines – 2014-06-09T13:11:03.010

Add output of pvdisplay -C to your question. That will determine how much, if any, of your disks is available for growing logical volumes on the volume group "system". Also paste /etc/fstab (or otherwise let us know what filesystem you're using). The logical volume is easy to grow, see man lvextend, resizing the filesystem on top of the logical volume depends on the filesystem used. – Sami Laine – 2014-06-10T12:05:14.963

Answers

1

I ended up booting up with gparted and extending resizing the partition. Then in the Partition Manager I resized the partition, all worked fine. I tested it first in a cloned VM just to be sure.

John Brines

Posted 2014-06-09T11:10:43.207

Reputation: 21

0

Commands to use: I believe your VG name is "system" and LV name is "root"

vgdisplay [VG name]

Look for the # PE's available and the size of the PEs and the amount of free space available. This tells you how much more space you have to extend it by.

Let's say you want to extend by 5G and yo have it available

You can do:

 lvextend -L +5G [lvname] will increase it by 5 GB

Older kernels you would need to unmount to resize which means in your case you'd have to do it in maintenance mode and then do your

 resize2fs [LVNAME]  

By the way the OS may not do it for you saying you need to run "e2fsck -f [LVNAME]" first.

Newer kernels you can resize on the fly

 resize2fs [LVNAME]

Hope that helps!

ben

Posted 2014-06-09T11:10:43.207

Reputation: 166