I want to increase the size of /home because its running out of space. /home is at the end and its inside /dev/sda4 and there is no unallocated space available.

Kindly take a look at the below gparted screenshot.

enter image description here

  • oh so it cant be done using gparted :( – el323 Jun 14 at 11:31
  • I think you can if you want to keep the separate /home. I just offered an alternative. – Melebius Jun 14 at 11:34
  • Is keeping a separate /home not recommended? And how can I increase the /home size without merging to /? – el323 Jun 14 at 11:36
  • Yes, you could shrink /dev/sda3 to make room for a bigger /dev/sda5 but that would be a lengthier process than what @Melebius suggests. – Jos Jun 14 at 11:36
  • 2
    The procedure using gparted would be: shrink sda3, move sda4 to the left, move sda5 to the left, and resize (grow) sda5. Start by making a backup of everything that you care about. – Jos Jun 14 at 11:38
up vote 3 down vote accepted

Since you have enough space in the root (/) partition, I would merge /home into /. Then optionally delete the extended partition completely and extend the combined root partition to utilize the free space. This operation will be most likely faster than resizing a partition at the end of the disk.

Before you proceed, I recommend making a backup, preferably the complete disk using Clonezilla.

Then follow these instructions (from an answer by htorque):

  • Boot the live CD/USB.
  • Mount the root partition to /mnt/root.
  • Mount the home partition to /mnt/oldhome.
  • Copy the data using rsync:

    sudo rsync -avz --hard-links --numeric-ids /mnt/oldhome/ /mnt/root/home
    
  • Open /mnt/root/etc/fstab and delete the entry for your home partition.

  • Unmount the root and home partition and reboot the system. If everything works as expected you can reboot again into the live system and then:
  • Open GParted.
  • Delete the old home partition, resize the root partition.

Is keeping a separate /home not recommended?

It’s just a matter of taste. Having all data in one partition avoids the problem of having one full partition and another almost empty, like in your case. On the other hand, a separate /home partition is good for backup and reinstallation.

My suggestion (using gparted):

  1. Make a backup of any important data on the disk.
  2. Shrink /dev/sda3 by, let's say, 50 Gb. You have more than that free, so the exact number is not important.
  3. Move the left boundary of /dev/sda4 to the left by the same amount.
  4. Move the left boundary of /dev/sda5 to the left (as /dev/sda4 is an extended partition, moving its boundaries does not move the "inner" partitions)
  5. Grow (= resize to enlarge) /dev/sda5 to the desired size.

Actually, it may be possible to do the last two steps in one go. I am not sure about that.

This will require physically moving large numbers of blocks, so it will be a lengthy process.

  • 1
    I believe that this answer doesn't put enough emphasys in backing up. That's the 0th rule before doing anything like this. – Ismael Miguel Jun 14 at 14:45
  • 1
    @IsmaelMiguel It's the first action on my list. – Jos Jun 14 at 14:48
  • 1
    @IsmaelMiguel I don't follow your comment. My first step is to make a backup. How do you suggest I should improve my answer? – Jos Jun 14 at 15:42
  • 1
    More emphasys on the backup. The list, as it is, kinda implies that the backups are part of gparted, when they should be before you even consider using gparted. I would move it to be the first line, outside the list. What do you think? – Ismael Miguel Jun 14 at 15:44
  • 1
    @IsmaelMiguel go ahead and write a better answer. I don't see where I suggest that backups are a part of gparted. – Jos Jun 14 at 15:45

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.