this post was submitted on 22 Oct 2024
25 points (100.0% liked)

Linux

8291 readers
571 users here now

Welcome to c/linux!

Welcome to our thriving Linux community! Whether you're a seasoned Linux enthusiast or just starting your journey, we're excited to have you here. Explore, learn, and collaborate with like-minded individuals who share a passion for open-source software and the endless possibilities it offers. Together, let's dive into the world of Linux and embrace the power of freedom, customization, and innovation. Enjoy your stay and feel free to join the vibrant discussions that await you!

Rules:

  1. Stay on topic: Posts and discussions should be related to Linux, open source software, and related technologies.

  2. Be respectful: Treat fellow community members with respect and courtesy.

  3. Quality over quantity: Share informative and thought-provoking content.

  4. No spam or self-promotion: Avoid excessive self-promotion or spamming.

  5. No NSFW adult content

  6. Follow general lemmy guidelines.

founded 2 years ago
MODERATORS
 

Hey folks!

I'm about to distro hop (again) to test Tumbleweed for a longer period of time 🦎 However, something i've not done before is to have my /home directory on a separate partition, should I? If I do it, should it be a different filesystem than the rest? (Been reading on OpenSuse TW forums and seen people mentioning that they use BTRFS for /home and XFS for the rest, or the other way around. Are there any benefits of using separate filesystems, or is this done to get the BTRFS backup for the /home dir?

What are the pros and cons of doing these changes to my system, lemmy know :)

top 17 comments
sorted by: hot top controversial new old
[–] mesamunefire 18 points 1 month ago* (last edited 1 month ago) (2 children)

If you tend to distro hop or want to change fundamentals of your system, having the home partition can be a boon. You can re-install your entire system without changing the home partition, keeping all your documents/files/etc... Thats typically why people do that. Personally, I just have a network drive for that sort of stuff and keep everything important there, but it can save you time.

[–] [email protected] 15 points 1 month ago (1 children)

Sometimes the config files might clash tho between distros with their own software sets.

[–] mesamunefire 6 points 1 month ago

True.

Honestly with the invent of flash drives, Networked drives, and other such solutions, it makes less sense to have a dedicated home partition. I usually blow it away with a new system as an excuse to get rid of all the old documents I dont need anymore. Although back in the day, I got rid of an entire bitcoin once....not recoverable. Ouch.

[–] [email protected] 3 points 1 month ago

Yeah, I do this too! A lot more convenient for me as I have multiple computers needing the same files.

[–] [email protected] 11 points 1 month ago* (last edited 1 month ago)

Always. Losing the root fs doesn't mean I lose the home fs.

Even on btrfs, and I currently do, I use a separate fs; to me it's not about having a separate partition but having a separate fs.

I am not prepared to lose my home data.

I have /efi, /home, /.

[–] [email protected] 5 points 1 month ago

Yes, I almost always do this. If the drive with your root partition fails, or you accidentally break your install, your home partition can be easily mounted again after a fix/re-install. Also if you have ssd's this will break up the write cycles between the drives and extend the drive life. And it so makes cloning the drive easier if you come across a scenario where that needs to happen. I'm sure others have their own reasons they will gladly lait for you. Good luck!

[–] [email protected] 4 points 1 month ago

Not really.

Even with lvm/sub volumes the benefit is that you could ostensibly keep one home directory between two different distributions you switch booting between. The better solution there would be to have a rsync backup and sync it after booting or shutting down or periodically because then you have a backup at least.

For distro hopping it’s not that great because who’s to say you’re getting the β€œgood” experience with some random new distro when it overrides its defaults meant to be nicey-nice with some other stuff from ~/.gnome/gtk2/gtk3/desktop/widgets/clock/fonts/ttf/arial?

Just back your stuff up, rsync selectively from that backup and use the same filesystem for home as you do for /.

It’s the same thing as asking if you should put a lift in your homes attached garage. If you have to ask if it’s good idea and not just cool, then the answer is no.

[–] [email protected] 3 points 1 month ago

I used to do that with my previous install (all ext4 though) and eventually ran out of space on my root. Now I use BTRFS with subvolumes. They appear as separate mountpoints and allow separate snapshotting, but all live on the same actual partition and share space.
Only other partition I have left is /boot. (I encrypt my root and GRUB was the only bootloader which supports encrypted BTRFS with an /efi mountpoint instead of /boot last I checked. I don't want to use GRUB and it also doubles your boot time having /efi only instead of /boot on a separate partition.

[–] seaQueue 3 points 1 month ago (1 children)

Separate partition or btrfs subvolume is my preference, that way I can take homedir snapshots on a schedule (every hour or two) separate from my rootfs snapshot schedule.

[–] [email protected] 2 points 1 month ago (1 children)

This.

I use single partitions, because since everything is SSD now, partition failures are almost nonexistent. I don't know why; I don't understand the mechanics of why disks are more prone to partition failures, but now when SSD start to fail, it seems as if it is anything except something that can be isolated by position.

But I do isolate by subvolume, and for the reason you give: snapshots. I snapshot root only when something changes, but do hourly snapshots of home. It keeps data use more manageable. Nightly backups, and I never have more than 24 home snapshot at a time.

[–] seaQueue 2 points 1 month ago (1 children)

Write yourself some package manager hook scripts that fire off root snapshots before package upgrades or installation. I keep like 10 of those in addition to my scheduled system snapshots. It makes rolling back a borked update trivial in case I don't have time to fix something that went wrong before important work needs to happen.

[–] [email protected] 1 points 1 month ago

snapper does that; I think it's available for most distros, so no scripting necessary. There's an Arch package that takes snapshots before installing any software.

Neat stuff!

[–] [email protected] 3 points 1 month ago

If possible I put everything on the same partition. Too often have I run out of space somewhere without any benefit. I've gone through several distributions with the same partition. When you reinstall you can just delete everything except for /home. I never had any problems with that.

Of course with BTRFS putting everything in separate subvolumes is preferred for snapshots (and probably other stuff I don't know about). BTRFS shares the disk space between all subvolumes.

[–] [email protected] 3 points 1 month ago

There's no right answer.

The Tumbleweed users are likely doing this separation just to use different partition formats for /home and /. It's one of the reasons why you'd want a separated /home; the others being already mentioned by other users (easier distro-hopping, easy backups), as well as the con (sometimes you'll have free space, but not in the partition where you need it).

[–] [email protected] 3 points 1 month ago

Personally it's one btrfs partition with subvolumes for root and home, previously i had a separate home with ext4 (it's always better to have a separate home)

[–] GustavoM 1 points 1 month ago

A separate /home partition means you can set $ROOTFS as read-only (and /home as rw) and have a "pseudo-everlasting but not really" file system.

(And before someone says "Why not simply disable logs instead? It's the same thing." -- yes, yes it is. But sometimes you want a "just werks" solution, even if it is a dumb one. Which is (obviously) disabling writes all over $ROOTFS.)

[–] [email protected] 1 points 1 month ago

People are talking about config issues doing this. When I do a reinstall, I just backup my dotfiles and let them rebuild. I usually don't have to restore many of them, just for a few apps I know I want the config for.