Ubuntu: How can I extend a partition with nonadjacent unallocated space?



Question:

This is my partition table: enter image description here How can I merge or resize my existing partition /dev/sda9 (and /dev/sda9 is my Ubuntu 14.04) with unallocated space? I don't want to lose my data.

I have tried to resize /dev/sda9 partition but I am getting any free space as shown no leading free space: enter image description here

How should I go about it?


Solution:1

NOTE:- As per AndroidDev, since it is a large amount of data that you will be moving, please be sure of sudden changes such as power outage, etc. Also if possible, back your data up before proceeding.

  1. Delete /dev/sda7.

  2. Right-click on /dev/sda8, then click "Resize/Move".

  3. Cut the value from "Free space preceding (MiB)" and paste it to "Free space following (MiB)".

  4. Click on "Resize".

  5. Right-click on /dev/sda9, then click "Resize/Move".

  6. Now, increase your partition size.


Solution:2

Unfortunately, you can't do that without Gparted having to literally rewrite most of the data on the disk.

A typical consumer HDD would be certified to have at least one "bit flip" error when rewriting an amount of data that large. Then there is also the matter of non-ECC RAM... The bottom line is don't even think about doing this unless you have a complete system image.

I consider that operation to be very high on the danger level, and personally, I wouldn't do it if it was my computer!

Partitions can never be extended backwards, only forwards.

What you can do however, is extend dev/sda5...


Solution:3

Another option is to create an ext4 partition in the unused space then use LVM (logical volume manager) to create a single volume that the system will see. Look at https://wiki.ubuntu.com/Lvm (see Resizing Partitions). I'm no expert, but it seems a possible way to go.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »