Partition schemes : Single or separated ?
Hello,
I would like to hear about your opinion on the partitioning scheme for your Arch installation, do you prefer to separate root and home on different partitions, or just make a single one ? I know it's up to the user preference but still I'm interested about your opinions.
Thanks to anyone who will contribute to this thread.
Edited 11 Jul 2019. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 9 · 100% up
- Kind
- Text
- ID
- cbcwld
34 comments
I'd recommend formatting a single partition to BTRFS (or maybe also add a swap partiton -- however, if you are adventurous, BTRFS has had swapfile support since quite a few months).
You can create e.g., `@root` and `@home` subvolumes if you wish, which is mostly useful for taking individual snapshots for incremental backup purposes: https://btrfs.wiki.kernel.org/index.php/Incremental_Backup You could restore the backup only for `@root` if you managed to break something, on just create a new `@root` when reinstalling, while still keeping `@home` intact.
The main advantage in addition to snapshotting is that you don't need to determine the maximum size of the subvolumes in advance. There are also fun features such as compression and RAID support.
Personally, I just stuck a BTRFS filesystem with root and home subvolume,s as well as a subvolume for my swapfile in a LUKS encrypted parition. My only other partition if the EFI system partition for booting.
There is also ZFS on Linux, which is similar, but I have much less experience with. It is more mature, however, setting it up may be a bit more complicated, because it needs an out-of-tree kernel module.
BTRFS is pretty great. One benefit that I really like is that adding a new drive to the pool is dead simple
Now I know this is a bit different from what OP asked, but how do you do with multiple disks?
I have a 250Gb SSD and a 2Tb HDD. What I do with ext4 is / on the SSD and /home on the HDD...
BTRFS supports multiple disks for RAID (striping/mirroring files or just metadata), but for your use case, you should probably go with two different partitions, as you actually want to specify which data goes to where.
By the way, if you have a bit of space to spare on bigger device, BTRFS might be useful for creating incremental backups with the `btrfs send` and `btrfs receive` commands, which can transfer snapshots (incrementally) between disks. I use this to back up my snapshots from my SSD to another SSD (a larger Samsung QVO drive), as well as to an external HDD. On the other hand, more mature filesystems (e.g., ext4) and rsync may be a fine alternative if you don't want fancy things like booting into a snapshot directly.
Thanks, BTRFS looks really tempting, especially about the subvolume.
You raise very cool arguments that tempt me to redo the whole thing again. Thank you for that. I'll have some learning to do.
What does having a separate home buy you? It comes at the trade off of having to guess how big to make root and potentially running out of diskspace on one partition or the other. If that is worth the trade off then go for it. If not then keep things simple.
Most people keep a separate home for the sales of reinstalling, but in Arch you can just opt to not format the drives when you reinstall and delete the other system directories.
lvm and friends
I was wondering about that too, the fact of being able to reinstall arch with the home untouched even if it's not reparated.
But what would be the odd of having a broke OS?
I have not broken an Arch system in years now. But when I first started I broke it a lot. So that question really depends on how much you mess with the system and how much you know about what you are doing when you do.
Almost every problem is fixible from the live usb without a complete reinstall though.
The odds of a broken OS is quite high if you like to mess with stuff but just because you can't boot your system anymore since you broke it, that doesn't automatically mean all the data is gone.
What matters is to what degree the system breaks and what part of it (it's a system not a single component). Though if it'd break enough to make data unavailable, a separate partition wouldn't have helped 99.99% of cases.
I don't really find a use in splitting into multiple partitions a single drive if not necessary. There is the argument of "in case the partition break the other partitions are untouched", but almost every time this is a no problem as that partition can probably be easily fixed, or at least recover data from it
Thanks for your answer. Have you been using Arch for many years? If so, have you already encountered problems that would break the system ?
Break the system no. Oddities here and there yes. It mostly comes from software update getting a new/different feature-set. For instance recently the update to electron 5 makes discord act wonky on vocal and video sometimes. But this is solved by using electron 4 instead
There might be more critical bugs if you mess with X configs, but since you made those configs yourself you can also fix them
Single partition is easier to manage. You don't have to calculate how much of your storage you want to dedicate to system.
Is there any impact about performance, mostly speed, if the home and root folder share the same partition, since apps on root will mostly need to read config files located on home?
Using Arch on a 500gb SSD by the way (70gb dedicated to Windows).
I don't think so. Even multiple partitions are still on the same drive.
like to have home on its own partition (or lvm volume). in case I need to nuke and reinstall the system my data and dotfiles are less likely to die
How much did you put on your root partition ?
512gb SSD: 1 gig boot (EFI partition), then one LVM group as follows: 64 gigs for root, 16gig swap (i'm oldschool), rest home. if I ever should need more space in root I can just resize the LVM volume.
There's no real need for this, but if you want to go down this road, lvm will be a more flexible solution.
Just keep it simple though.
Thanks, I've take a peek at lvm, seems to be quite complicated for me :D
Not only different partitions, but different physical drives.
root and swap lives on an SSD while home sits on a larger HDD. My system takes longer to log in than it does to boot.
Yup, I would have separated my partitions without hesitation if I had more drives on my laptop.
The backup plans you can make with the BTRF’s are the best I know.
Yeah, I've learnt more about BTRF since it has been mentioned in this thread and the backup potential is quite huge.
Deleted before we saved it.