@georgezilla
You guys talk about how you use separate partitions for /, /swap, /home, /var/log, root or whatever.
But I have no context for any of that. I don’t have the experience to know why this might be good or bad or in what ways.
Btw, I can confirm that ubuntu (which I think is supposed to be newbie friendly) does allow for the control you are looking for at install time. You can mount /, boot, home, tmp, usr, var, srv, opt and usr/local
to different partitions.
What I do have is research tho. For example, above I was confused why linux formatting tools do not offer the ability to set block size. But as I learned later, when you consider how files are stored in the filesystem, it doesn’t really matter what the logical block size is. File data is stored in extents - ranges of blocks. Whether that range is large or small (respectively small vs large block size), it’s going to be 2 numbers anyway.
It might have small effect on fragmentation, but it’s unlikely to be relevant. In fact it might be slightly beneficial to keep it small so space isn’t wasted on tiny files (again a small effect).
On average you’ll have (num files)*(half the block size) of wasted space on any drive.
Also read about inodes. Running out is only relevant on ext4. mkfs.ext4
has certain params to control the number of inodes - bytes per inode, or inode_ratio
in mke2fs.conf
which has several presets based on expected usage.
Ultimately this number effectively means “What is the average file size you expect on your drive?”. For a media drive, you can safely set it at 1 or even 4 megs and reclaim a couple of gigs of metadata.
None of this is relevant for btrfs
.
For swap, I decided to reserve 8 gigs as a swap partition (half the physical ram).
Also, I had an idea. On an SSD, the swap partition could potentially function as over-provisioning. But this would depend on how linux handles it. For example if the entire partition is permanently used it wouldn’t work. But if say some bits of data are paged in, then linux tells the drive to free those blocks, then it would work.
Given that I have no idea what to do with a bunch of extra partitions, I decided to just plonk the entire drive (sans swap) on /
and be done with it.