How should I setup my partitions on linux? [closed]

Posted on

Problem :

I’m going to install fedora on my machine. I have 16 GB’s of RAM, 120 GB SSD & a 1 TB Drive. How should I set up my partitions to get the best use of what am running?

Solution :

As an opposing response to @emb1995 I would say “It depends”… I say this because it is somewhat important to know what you use your computer for. The SSD is small, and thus if you want to store all of your music and pictures and videos in your /home directory (which is where the default folders are), the you will fill up that SSD quite fast.. I would assume since you HAVE a 1 TB HDD that you are planning (or already) have a decent amount of data that you need to store. If this is the case, and for desktop purposes, I would put the layout as follows:

Mount Point | Size, Type               | FS Type
/boot       = 150MB, Primary Partition = ext2
/           = ~103GB, Primary          = ext4
swap        = 17GB,  Primary Partition = Swap

/home       = All 1TB, Primary Partition = ext4


Now remember in this situation the rule of “The bigger they are, the harder they fall” applies quite well… meaning that if you put important data on your computer, you better be backing it up. 1 TB of data is an aweful lot of data to lose in case of a HDD failure. I would suggest a RAID-1 or RAID-5 if your mobo supports it, or if you have the extra $ for another drive or 2… even a software raid isnt as bad as loosing the data… and in some cases can be better (portability standpoint).

Swap on SSD?!?!: You will find many arguments against this, but being you have 16 GB of RAM I doubt you will reach a point of actually using the swap. Also, most of the argument of ‘burning out your SSD’ dont really apply anymore to modern-day SSD, you will most likely never ‘burn out’ your SSD before you upgrade first. Allocating 17GB of swap was so you can hibernate and resume. Ahh yes, and if you are that paranoid about it you can manually set the OSs “swappiness” to ‘very low’ as to encourage it to use RAM moreso than swap, and thus ease your worries some more about swap frying your ssd (even though I already said it wouldn’t happen).

Do /boot, /, swap in that order because if you ever want to remove your swap from the ssd, it is easier to grow the ‘/’ backwards to consume that space, than it is to grow ‘/’ forward. Trust me on this one!

Lastly, if you are using your system as a fileserver or web server and not for ‘desktop’ use, then this scheme doesn’t apply very well and would need to be rethought with intended use in mind.

I would recommend keeping / and /home on your SSD, but /boot, /var, and /media/data on the rotary disk. This guide seems to be a wealth of information.

There’s one item the guide @emb1995 posted that hasn’t been stressed enough here.

Cells wear out. Consumer MLC cells at mature 50nm processes can handle 10000 writes each; 35nm generally handles 5000 writes, and 25nm 3000 (smaller being higher density and cheaper). If writes are properly spread out, are not too small, and align well with cells, this translates into a lifetime write volume for the SSD that is a multiple of its capacity. Daily write volumes have to be balanced against life expectancy.

Therefore I would recommend against putting /home /var and any other partition you use to store variable data on the SSD. And that probably also means it’s best not to put SWAP on the SSD as well because it is by nature volatile. Again in this particular case with 16GB RAM your SWAP usage is likely to be low but still it’s a waste of write operations on a device that has a limited number of them.

Leave a Reply

Your email address will not be published. Required fields are marked *