Increase the root filesystem in Linux inside VMWare Workstation/VSphere without LVM

In this tutorial, I’ll explain the step by step procedure to resize the Linux root partition without losing the date. This will be really handy if you are not using LVM and you came to know that your existing root partition is run out of space.

WARNING: It’s really dangerous, so backup your data before attempting this. Please don’t blame me, if you destroy your system. You are responsible for your own actions!

Prerequisites to Start this Tutorial:

You will need to download the GParted live CD ISO file for the later use in this tutorial, so you can get this here.

Let’s start the tutorial by verifying the current root filesystem size:

df -h

1Create any file, just for verification, that we didn’t lose the data during the root partition increase process.

Turn off the virtual machine:

sudo shutdown -h now

2

Once, it shutdown, Click on the “Edit Machine Settings“, select the Hard Disk from the right side and press “Utilities“. A menu will be displayed, select “Expand” from it:

3

Current size is 4GB (It will be different in your case):

4

Increase it to your desired size(mine is 10 GB):

5

Once it will be expanded, will show you the success message:

6

Select the CD/DVD and press Browse:

7

Locate the GParted ISO that we have download in the prerequisite step:

8

Next, Power on the virtual machine to BIOS:

9

Select the CDROM as first boot device from Boot Menu:

10

Accept the Default Settings:

11

Select “Don’t touch keymap“:

12

Press Enter to accept the default type of keyboard that have:

13

Press Enter again to start GParted in graphic mode:

14

Select the “linux-swap” from the partition layout and press the “Swapoff” from the Partition menu:

15

Select the “exteneded” from the partition layout and press the “Resize/Move“from the Partition menu:

16

Assign all unallocated space to it:

17

Press the “Resize/Move” Button after assigning all the unallocated space:

18

Next, again select the “linux-swap” from the partition layout and press the “Resize/Move” Button:

19

Move the swap to the end of the extended partition and press the “Resize/Move” Button:

20

Click “OK to the warning:

21

Once again select the “exteneded from the partition layout and press the “Resize/Move” button:

22

Shrink it like this, so that it’s size will only be equal to the size of the swap partition by moving the slider from left to the right side and press the “Resize/Move” button:

23

Next, select the “/dev/sda1“,which is root filesystem, from the partition layout and press the “Resize/Move” Button:

24

Assign all unallocated space to it:

25

Then press the “Resize/Move” Button:

26

Once you are done with the changes and sure that they are correct, press the “Apply” Button (Be Careful: changes will be irreversible once applied):

27

If everything go well, GParted will show us the “All operations successfully completed”, just press Close:

28

Reboot the system, login to the machine and verify the increase in the size of the partition of root filesystem:

df -h

29

 

Enjoy :-)

Hope this will help you!

Please Remember me in your prayers!

 

About these ads

One response to “Increase the root filesystem in Linux inside VMWare Workstation/VSphere without LVM

  1. twitter followers January 20, 2014 at 12:08 pm

    Just want to say your article is as amazing.

    The clearness in your post is simply nice and i can
    assume you’re an expert on this subject. Well with your permission let me to grab your feed to keep up to date with forthcoming post.
    Thanks a million and please carry on the enjoyable work.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 115 other followers

%d bloggers like this: