GParted Tutorial: Expanding root partition when LVM is not available

A tutorial on using GPartedaka Gnome Partition Editor.

Here I will use a VM (SLES 10 Sp4, no LVM) to expand the root “/” partition, currently installed on /dev/sda2
gparted-tutorial

First… What is GParted? It is a tool built on a mini linux kernel you boot into (similar to another favorite tool of mine: clonezilla) that you can use to expand partitions.

Since the advent of using LVM, especially on linux, expanding a raw partition is a diminishing need. But for those that take care of legacy systems pre-LVM (e.g. Suse Linux Enterprise 10) or that just have systems installed without LVM, this definitely comes in handy.

(SIDE NOTE: If you have LVM, I have various LVM tutorials, e.g. reducing LVM disk size, adding hard drives and LVM on linux, and extending root partition with LVM)

Okay, let’s move on!

Here is a photo tutorial on using GParted!

CAUTION:

GParted is a third party tool that will resize your partitions. No warranties!! So back up your data whether you copy files off or you clone your VM or clonezilla your server. Make sure you have a backup!

THAT BEING SAID …

anecdotally speaking I’ve used gparted mostly on VMs, probably 20 or 30 times, and on physical servers about 3 or 4 times (explained more at the end) and have not lost data

Pre-Test Photo

Using “fdisk -l” and “df -h” to see the current partitioning

gparted-tutorial-01

In my VM, I will expand the disk from 8gig to 12gig

gparted-tutorial-02

gparted-tutorial-03

Load in my GParted .iso

gparted-tutorial-04

Connect my VM CD drive

gparted-tutorial-05

Reboot your VM

gparted-tutorial-06

VM (or your server) will reboot into GParted

gparted-tutorial-07

Choose default keymap
gparted-tutorial-08

Choose language (default for my US English)

gparted-tutorial-09

Choose default mode (choice 0)

gparted-tutorial-10

Choose the partition to resize (/dev/sda2), then click “Resize/Move”

gparted-tutorial-11

Two Methods: 1) You can drag the slider on top, or 2) put in the actual number resize below

gparted-tutorial-12

This is what it looks like after resize

gparted-tutorial-13

Click “Apply”

gparted-tutorial-14

Confirm and Click “Apply”

gparted-tutorial-15

When finished, click “Close”

gparted-tutorial-16

DOUBLE-CLICK (not Single-Click) on “Exit” in upper left

gparted-tutorial-17

Choose “Reboot” and “OK”

gparted-tutorial-18

Do Not Press “ENTER” yet, need to eject disc first

gparted-tutorial-19

In VM, uncheck both boxes on top to “Eject” cd

gparted-tutorial-20

Now press “ENTER” to reboot

gparted-tutorial-21

Machine is rebooting

gparted-tutorial-22

Post-Test Photo

Using “fdisk -l” and “df -h” to see the new partitioning. Re-size already done. Note, no resize2fs needed or extending the partition needed as you would when extending an LVM.
gparted-tutorial-23

DONE!!

Geek, Linux, Unix

Leave a Comment

Your email address will not be published. Required fields are marked *

Spam protection by WP Captcha-Free