1

I decided to split my hard drive into two partitions in order to keep my OS (Linux Mint) and home folder separate. The idea in general was nice, but I failed to estimate the sizes of the partitions and ended up in a situation, when one of them is almost full, while the other is almost empty.

My current "layout":

  • sda5: mount as "/", currently ~1 GB space left
  • sda6: mount as "/home", currently ~35 GB of free space

To add some complexity, while installing Linux I ticked the option "encrypt my home folder", so I guess that as a result the data on sda6 is most likely encrypted.

Also: I have Windows installed on the same hard disk and it occupies partitions sda1-sda4.

I'd like to balance the free space somehow or even merge those two into a single partition - I'm fine with either one. The thing is I don't want to break anything and be forced to reinstall my Linux. How shall I do this properly ?

4
  • 1
    A screenshot of the drive (showing partitions & sizes) from gparted might help, not sure how big sda5 & 6 are. And did you check that a ton of space in sda5 isn't being taken up with easily delete-able stuff (tmp, cache, apt archives...). But I think I know the basic steps anyway...
    – Xen2050
    Sep 11, 2018 at 3:11
  • Thanks - very helpful. I started digging out for the folders that take the most amount of space and found out the /timeshift is to blame as well. I've learnt something new :D.
    – LA.27
    Sep 11, 2018 at 23:35
  • 1
    Welcome :) Baobab (disk usage analyzer) is good for seeing what folders are taking up all the space too. I hear timeshift is good, and/or a home backup is always handy for after reinstalling the whole OS if everything goes wrong ;-)
    – Xen2050
    Sep 11, 2018 at 23:45
  • Yep - I feel like I need to improve my knowledge on Linux. Both in terms of tooling and as an OS in general. I've migrated from Win env some time ago and looks like it's high time for me to get more engaged.
    – LA.27
    Sep 11, 2018 at 23:47

1 Answer 1

1

Home encryption should be using eCryptfs, which only encrypts files & not the entire partition (no LUKS, right?), so just copying the home files (the on-disk encrypted versions, not the ones decrypted & visible when you're logged in) to somewhere else (another partition) & telling the system where the new home is (edit /etc/fstab's /home entry) should work.

Step Zero is to have backups of any irreplaceable data. Re-downloading and re-installing the OS & programs is easy, but personal data maybe not so easy.

If you just want to shrink/move one partition & enlarge the other, using a live ISO (USB/DVD/etc) and gparted should work.

  1. Boot a live ISO (USB/DVD/etc) so your sda5 & 6 are not mounted
  2. Run gparted to shrink sda6, optionally moving it (so there's free space next to sda5), then enlarge sda5.

To move home from sda6 to sda5, you just need to copy/move the files & edit /etc/fstab, but without having enough space in sda5 then shrinking a partition & enlarging sda5 might be required first. Also a good time to make a full backup of your home, then delete home's partition (sda6), then enlarge sda5 & copy the files.


Some helpful Q's from askUbuntu:

1
  • Thanks for the hints. I used them to come up with another solution. I shrank the bigger partition, created a brand new one in that place, mounted it to my "/nix" folder (which took a lot of space) and now everyone's happy. Moreover, I noticed that timeshift stole something like 10GB with its snapshots, so I saved a bit here as well. Thanks for the hints - I've learnt something by the way.
    – LA.27
    Sep 11, 2018 at 23:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .