Ubuntu – Questions about Ubuntu 18.04 LTS Install / partition sizing on SSD / HDD system

18.04dual-bootpartitioningssd

Hi Everyone – I am planning to upgrade my dual boot Ubuntu 16.04LTS/Win 10 system to 18.04LTS /Win10 and would love some opinions. My main drive is a 1TB SSD and my data drives are 2 8TB HDD’s running in RAID1 configuration. I use Ubuntu chiefly for deep learning research with Tensorflow and Pytorch on large(r) Medical Imaging datasets.

In the 16.04LTS build, I split the SSD 60/40 between Windows/Ubuntu, as I anticipated using Windows more. Of course, that’s not the case, and I have yet to crack 250GB use there. I allocated 100GB to Ubuntu root (/) and have only used 30GB so far.

I made a choice to put /home and /linux-swap on the HDD. Obviously, putting /home on the HDD was a terrible mistake, and has hurt performance on the unit. I plan to fix that in the Ubuntu 18.04LTS install.

Plans are to shrink my Windows ntfs partitions down to 450 GB, and expand the Ubuntu ext4 partitions up to 500 GB, leaving 50GB unallocated. I read that it is helpful not to allocate SSD’s fully as it improves performance / error correction /stability. I’m not sure if that only applies to older SSD’s (mine is a 2 yrs old Samsung 960 EVO, so its part of the newer batch), is fantasy/hearsay, or what.

With the Ubuntu 18.04LTS install I will allocate to the SSD like this:

  1. Dual-boot loaders and Windows 10 – 450 GB
  2. Ubuntu root : 100 GB (is this too much? Especially if installing anaconda and many packages?)
  3. Ubuntu home : 350 GB

I’m going to keep linux-swap on the hard-drive because I have 64GB of RAM. I don’t anticipate running out of memory anytime soon, but with 8TB of disk space, might as well put in the swap partition on the hard drive. Anyone have a strong opinion let me know.

Anyone have any disagreement with what I am doing here or any way to do it better? I’m just a hobbyist in Ubuntu so I would love the opinion of someone who has done many installs and ran Ubuntu linux systems a lot to weigh in.

Best Answer

  • 100 GB for / is a lot! Unless you use a lot of huge temp files, this is going to be overkill. 64GB is double of what a typical system needs and I have allocated 48GB because the largest tmp file I ever created was 24GB.

    df --human-readable | grep --invert-match "/loop"
    Filesystem                         Size  Used Avail Use% Mounted on
    udev                               7.8G     0  7.8G   0% /dev
    tmpfs                              1.6G  9.6M  1.6G   1% /run
    /dev/sdb2                           47G   17G   28G  39% /
    tmpfs                              7.9G   92M  7.8G   2% /dev/shm
    tmpfs                              5.0M  4.0K  5.0M   1% /run/lock
    tmpfs                              7.9G     0  7.9G   0% /sys/fs/cgroup
    /dev/sdc1                          932G  461G  472G  50% /media/Data
    /dev/sdb3                          154G  112G   35G  77% /home
    /dev/sdb1                           96M   56M   41M  59% /boot/efi
    tmpfs                              1.6G  116K  1.6G   1% /run/user/1001
    

    Rule of thumb:

    • 16Gb for a minimal system
    • 32GB for the average Joe
    • 64GB for a beefy system
    • More for BFMs
  • Keeping 10% of your disk as "unallocated" is a very good idea: not only because of wear-leveling but because of flexibility: you don't need all that space when your PC is brand new, and that free space is your proverbial spare tire if you ever need to extend one of the other partitions when they run flat! ;-)

  • You can put /home on the SSD and symlink the big files on the HDD.
    E.G. in the above system, /home/fabby/Videos, is actually on /dev/sdc1. Have a look here for the long story, but basically it comes down to:

    # copy all Video files from SSD to HDD
    cp --preserve=all --recursive /home/fabby/Videos /Media/Data/home/Fabby/Videos
    # now delete them from the SSD
    rm --force --recursive /home/fabby/Videos/
    # now create a symbolic link to the right volume
    cd /home/fabby
    ln --symbolic /Media/Data/home/Fabby/Videos Videos
    

    The symbolic link Videos in fabby's home directory is now pointing to /dev/sdc1 mounted on /Media/Data/ in the directory home/Fabby/Videos.

Which means that all of my Documents, Downloads, Music, .. are on my SSD, except the Videos, which are on the HDD.

Best of both worlds! 0:-)

Related Question