Moving A Partition

There are times when you wish to increase the size of a partition, and there is free space on the disk, but it is not next to the partition you need to expand. In this case, you will need to move one or more partitions to "move" that free space next to the target partition.

For this demonstration I have the hard disk set up with a typical Windows/Ubuntu installation. We have a root (/) partition, a larger home (/home) partition, and then a swap partition, with free space at the end of the disk. We have run out of room in the home partition and need to give it more room, but we have no free space next to it in which to expand. We must move the swap partition.

  • Info <!> Note that moving a partition is particularly dangerous and is more liable to data loss or corruption. When a partition is moved, the files on that partition must be moved with it. As was said at the start, ALWAYS back up your data before performing a partitioning operation. It is a good idea to back up the entire drive to a remote location. Modern partition editors are pretty safe, but there is always the chance that the operations will be interrupted before finished; like say, the fuse in the computer's power supply blows. If something like this were to happen, you will potentially lose all the partitions and files on the entire hard drive and have to start over.

    Info <!> Beware! I have had the above happen to me! I have hosed and had to reformat an entire hard drive and reconstruct it! The vast majority of the time, partitioning is easy and safe, but if you don't back up your hard drive before performing these operations you're setting yourself up to get bit!

After assuring that the swap partition is unmounted, first select the partition by right-clicking on it and selecting "Resize/Move" from the menu:


  • ZeroPreceed.png


In the above screenshot, the representation of the partition starts off at the left side of the graphical bar and the "Free Space Preceding" is at zero. To move the partition, left click and hold on the partition itself (rather than the arrows at the side, as with resizing) then drag the partition to the desired location. Notice the progress:


  • MidMove.png


Notice that the "Free Space Preceeding/Following" values are now both non-zero.


  • EndMove.png


Alternatively, you can vary either the "Free Space Preceeding" or the "Free Space Following" values, as long as neither value is or reaches zero. Adjust either one and the other will automatically self-adjust to reflect the movement. If you adjust both the "New Size" and one of the "Free Space" values, the partition will be resized as well as moved. This is particularly useful if you need to resize and move the partition, since this can be done in one operation.

When we have completed moving the Swap partition to the end of the drive, the "Free Space Following" value is now zero and the "Free Space Preceeding" value is the same as "Free Space Following" was at the beginning of the operation. Then we can expand the /home partition into the free space beside it:


  • EndMoveResized.png


Once the partitions are moved and/or resized to your satisfaction, click the "Apply" button at the top of the window to apply the changes.

Next Page - Reformatting A Partition

Main Page

HowtoPartition/MovingPartition (last edited 2018-01-15 10:45:38 by cpe-172-116-79-89)