Increase /Home space

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
Okamyza
Level 1
Level 1
Posts: 5
Joined: Sat Jul 28, 2018 1:08 pm

Increase /Home space

Post by Okamyza » Mon Jul 30, 2018 6:04 am

Hi All.
I have just installed Mint 19 Cinnamon as a dual boot with Windows 10 after 5 attempts & well appreciated help from these pages.
My problem is:
I created 200GB free for Linux
on install I created 20GB to /
4GB swap area
and the balance to /Home.

I now find I have only 14GB free in /Home but under devices I have 185GB Volume which I can't seem to access.

How do I increase /Home to include this extra space?

Many thanks,

Okamyza

gm10
Level 20
Level 20
Posts: 10076
Joined: Thu Jun 21, 2018 5:11 pm

Re: Increase /Home space

Post by gm10 » Mon Jul 30, 2018 6:20 am

Sounds to me like your /home resides on your root partition. Open a terminal, post output of

Code: Select all

lsblk
and we'll take a look.

Okamyza
Level 1
Level 1
Posts: 5
Joined: Sat Jul 28, 2018 1:08 pm

Re: Increase /Home space

Post by Okamyza » Mon Jul 30, 2018 6:46 am

Hi,
Thanks for your swift help. lsblk give:-

agh@AGH-HP-250-G6-Notebook-PC:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 260M 0 part /boot/efi
├─sda2 8:2 0 16M 0 part
├─sda3 8:3 0 255.1G 0 part
├─sda4 8:4 0 980M 0 part
├─sda5 8:5 0 14.1G 0 part
├─sda6 8:6 0 20G 0 part /
├─sda7 8:7 0 3.1G 0 part [SWAP]
└─sda8 8:8 0 172.2G 0 part
sr0 11:0 1 1024M 0 rom
agh@AGH-HP-250-G6-Notebook-PC:~$ ^C
agh@AGH-HP-250-G6-Notebook-PC:~$

gm10
Level 20
Level 20
Posts: 10076
Joined: Thu Jun 21, 2018 5:11 pm

Re: Increase /Home space

Post by gm10 » Mon Jul 30, 2018 7:27 am

No problem. As you can see, you do not have a separate /home partition. Your system resides only in that 20 GB partition you created.
I take it that it is that 172.2 GB partition after the swap partition where you want your /home to be?

Let's format it so we can use it for your /home - warning, this deletes all files on that partition, if you have any files from your Windows install on there that you need then do not run this command and stop here:

Code: Select all

sudo mkfs.ext4 /dev/sda8
Now let's mount the partition so we can write to it:

Code: Select all

sudo mkdir -p /mnt/home
sudo mount /dev/sda8 /mnt/home 
If that worked without errors, we'll proceed to copy the files over. Close all running applications except for your terminal window please, then do:

Code: Select all

sudo rsync -av /home/* /mnt/home/
If this also worked without issues, let's move your current user folder out of the way:

Code: Select all

sudo mkdir /oldhome
sudo mv /home/* -t /oldhome
Now we'll unmount the new partition again and re-mount it as your new /home:

Code: Select all

sudo umount /mnt/home
sudo mount /dev/sda8 /home
You may want to open the File Browser to confirm that your home folder is there and you can access it.

Last but not least, we'll need to make the system remember where your new /home is, so first you need to find the UUID of the partition we moved it to:

Code: Select all

blkid /dev/sda8
The output will be similar to this, we'll need the bolded part (of your output, not this example) in the next step:
/dev/sda8: UUID="c1e2547e-edbd-4846-a939-0d8c942a8cb5" TYPE="ext4" PARTUUID="37d7174b-670e-4968-bb34-f35c0c53c70c"
Now we'll use that information to add your new /home to the file system table:

Code: Select all

xed admin:///etc/fstab
add this line at the end and replace this example UUID with the one you found in the previous step:

Code: Select all

UUID=c1e2547e-edbd-4846-a939-0d8c942a8cb5 /home           ext4    defaults        0       2
Save the file, reboot to make sure it all works.

If it all booted up fine, in a last step let's get rid of the backup I kept earlier in case things didn't go well:

Code: Select all

sudo rm -rf /oldhome
That's all folks! You successfully moved your /home to a new partition.
Last edited by gm10 on Mon Jul 30, 2018 7:59 am, edited 1 time in total.

Okamyza
Level 1
Level 1
Posts: 5
Joined: Sat Jul 28, 2018 1:08 pm

Re: Increase /Home space

Post by Okamyza » Mon Jul 30, 2018 7:37 am

Thank you ever so much.

Okamyza
Level 1
Level 1
Posts: 5
Joined: Sat Jul 28, 2018 1:08 pm

Re: Increase /Home space

Post by Okamyza » Mon Jul 30, 2018 7:56 am

Hi,
I'm getting an error "mount: /home: mount point does not exist."

the "umount /mnt/home" gave no error. Just the "mount /dev/sd8 /home gives an error.

The copying across of files seemed to go through ok.

Thanks

gm10
Level 20
Level 20
Posts: 10076
Joined: Thu Jun 21, 2018 5:11 pm

Re: Increase /Home space

Post by gm10 » Mon Jul 30, 2018 8:00 am

Goodness, I forgot a slash in one command above. I fixed it above for the benefit of others, but what you need to do is

Code: Select all

sudo mkdir /home
and then continue the above procedure from the mount step that previously failed.

My apologies, I should have paid better attention.

Okamyza
Level 1
Level 1
Posts: 5
Joined: Sat Jul 28, 2018 1:08 pm

Re: Increase /Home space

Post by Okamyza » Mon Jul 30, 2018 8:04 am

No problem. Thanks again.

Post Reply

Return to “Newbie Questions”