btrfs: do I really need a separate /home and WHY?

Hi all =)
I’m attempting at installing 13.2 on a single disk desktop machine but I don’t understand why the installer suggests a separate /home partition and why not with the prodigy btrfs file system? What’s the point of not having my personal file in a snapshot capable partition?
And why XFS and not Ext4 (default fs suggested for /home by the installer)?

I may understand that a separate /home may have its advantages in case of upgrade/reinstall, but why not on btrfs?
Does btrf only accept one partition from the same disk or the whole disk only (+subvolumes)? (tha’t probably a weird question but why not unifying the advantages of a separate /home plus those of a btrfs fs?)

What are the disadvantages of /home as subvolume under a whole disk btrfs formatted?

I’m not interested in wasting time learning “old” filesystems (I’m a newbie after all :slight_smile:

Performance is not an issue here, data safety first!
Thanks and sorry, but I couldn’t find any good answer on the web…

Good questions. I hope someone has answers.
But if you search the forum there is a ‘Heaven and Hell’ account of btrfs.
Here is just one example: https://forums.opensuse.org/showthread.php/503867-no-space-left-on-device-opensuse-13-2
Personally I didn’t go with it, preferring ext4 - and yes with /home separate

Hi,

I have some vm with only one btrfs partition and no problem during the install. I guess you can use just one btrfs partition that includes everyting :slight_smile:

On Mon, 05 Jan 2015 05:56:01 +0000, suseisnotdebian wrote:

> I may understand that a separate /home may have its advantages in case
> of upgrade/reinstall, but why not on btrfs?

I installed my system with home separate even with btrfs (13.2 on a new
install), and I’m glad I did - because I do a lot of stuff with Virtual
Machines, and btrfs imposes a serious performance penalty for that type
of work - with 8 or 9 VMs running at one time, I would have active disk
corruption in the VMs because the entire disk subsystem would hang up for
brief periods.

I switched /home to xfs for performance reasons, and couldn’t be
happier. If I were building the system from scratch, I’d probably do
btrfs for the root partition (/), and ext4 for /home.

I would always do a separate home partition, except in very specific edge
cases with virtual machines where partitioning isn’t important (because
the machines are volatile with data stored in the host OS).

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Sorry, do you mean separate /home and both partitions on btrfs? I never heard of this scenario and still struggling to understand if it’s possible

Also here sorry, just curious (as a newbie), what kind of work/situation requires 8 or 9 VMs runnins at the same time?

Many thanks!

When the system would be setup I think first thing to do would be studying how (snapper or whichever tool) to prevent the partition from being fulfilled with snapshots (from what I see there’s not integrated tool in the fs to prevent such scenario).

Thanks for your contribution, but I still salute btrfs as the best option available, even if it’s not been explored/experimented as much as Ext4.

Opensuse Reference chapter 4 explains snapper openSUSE Documentation
You could look at programming it with cron aswel

If you haven’t read the start up manual I would start with that first openSUSE Documentation

I running 9 VMs when in need of a smallish cluster to demonstrate sharding
using a ‘legacy’ database quite often.

Sry, I can’t be of any help when it comes to ZFS or btrfs, as COW and
databases is an avoidable mismatch, so I avoid btrfs.

Shvenky, posting from Shvenk’s Lair

Partitioning separates / (root) and /home from runaway processes growing /var and /tmp. It enables appropriate privileges to be set for the different partitions.
Many backup utilities will work within partition boundaries, so separation facilitates the creation of appropriate backups. Separate partitioning can help to contain disk corruption (e.g. file system corruption is local to a partition). Of course there is also the specific reason to separate personal data and application settings from major system changes - you mentioned here:

I may understand that a separate /home may have its advantages in case of upgrade/reinstall, but why not on btrfs?

Relatively speaking, the majority of files (e.g. multimedia) in /home will tend to be static i.e. rarely updated, although some deletions and additions will occur. Backups certainly required, but snapshots could be seen as overkill so the COW capability provided by btrfs would not be necessary. You could still use Btrfs for /home, and apparently you can use it with COW disabled. However it is not pre-configured for snapshots (i.e. with Snapper) - you have to set it up.

I keep my data on a separate partition with ext4, so no experience with XFS.

Does btrf only accept one partition from the same disk or the whole disk only (+subvolumes)? (tha’t probably a weird question but why not unifying the advantages of a separate /home plus those of a btrfs fs?)

You can format one or several partitions separately with a btrfs file system on the same disk. You can set up the whole disk as one btrfs file system, or you can set up a single file system over a set of physical devices. I haven’t tested the latter configurations.

What are the disadvantages of /home as subvolume under a whole disk btrfs formatted?

The only disadvantage I can think of for “subvolumes” is that they are new and the possibilities are not well understood without some research.

Subvolume looks like a directory, but it’s more than that, and the file system treats it like a separate device that is mountable. Using Btrfs, my /home is included in the root partition. I configured it as a separate subvolume to make sure it is automatically excluded from all snapshots. Snapshot is always by subvolume, and must be stored on that same subvolume, not elsewhere. Thus system snapshots reside in a hidden read-only /.snapshots directory, and are themselves excluded from system snapshots.

On Mon, 05 Jan 2015 08:06:01 +0000, suseisnotdebian wrote:

> hendersj;2687294 Wrote:
>>
>> I installed my system with home separate even with btrfs (13.2 on a new
>> install), and I’m glad I did
>
> Sorry, do you mean separate /home and both partitions on btrfs? I never
> heard of this scenario and still struggling to understand if it’s
> possible

I mean separate partitions in the partition table. A partition is a
division at the disk level, not within the filesystem.

> hendersj;2687294 Wrote:
>> On Mon, 05 Jan 2015 05:56:01 +0000, suseisnotdebian wrote:
>> …with 8 or 9 VMs running at one time, I would have active disk
>> corruption in the VMs because the entire disk subsystem would hang up
>> for brief periods.
>
> Also here sorry, just curious (as a newbie), what kind of work/situation
> requires 8 or 9 VMs runnins at the same time?

No problem - I am a technical writer in my day job, and I work with a
product that can be clustered. In order to validate my documentation, I
stand up a cluster that contains a number of nodes for front-end proxy
servers (load balanced through a load balancer using haproxy in another
VM), and has a few VMs that run web services so I can make sure my setup
is working. My cluster configuration includes:

  1. Router with haproxy and port forwarding to an internal “private”
    network
  2. Admin node
  3. Backup admin node
  4. 4 “engine” nodes
  5. 2 web servers
  6. 1 web server with a proxy agent on it

So that’s 10 when I have the full environment running for testing
clustering documentation.

Normally, I only run 5 or 6 (a non-clustered config with multiple web
servers and an agent or two) - just depends on what I’m testing.

Jim

Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

Thanks a lot consused for going through my points and giving me a full explanation, I really appreciate that =)
I’ll probably have to open a new thread for next step/question.

It’s clear to me that the way to go is to format the whole drive with btrfs and to assigne to subvolume for the / (root) and /home partitions.
By following the graphical installer is then Opensuse also creating a small /boot partition for grub2 to work?
This way I would loose the benefits to feed btrfs with the whole drive (oh well, I’m almost forgetting the swap partition!).

This is gonna be an installation on a netbook (SSD) providing also a SD in-built reader, should I use I high performance SD card for /boot and grub2 and would be the installer able to help in setting up.

Well, actually here http://opensuse-guide.org/installation.php there’s not mention of /boot, so I’m probably just misunderstanding how the btrfs root partion boot in openSUSE…

I’ve got the feeling that I’m trying to complicate things a bit too much… but it would be nice to understand.

Thanks!

To add confusion:
http://unix.stackexchange.com/questions/103501/boot-partiotionless-disk-with-syslinux

Ok if you plan on a encrypted drive you must have a separate non-encrypted partition. Also since Grub does not know how to write to a BTRFS partition (can read but not write) It is wise to have a separate non-BTRFS boot since there are edge cases that need that function.

IMO it is not wise to have all on one partition even if BTRFS uses sub volumes. If you want home BTRFS fine but on a separate partition. Keeping System and user data separate is really a very good idea. Otherwise you are just a Windows user LOL and if you don’t some day in the future it will bite you.

Thank you for that. You are asking reasonable questions at the right time i.e. planning, so I would continue here for that. If you hit a problem during/after installation, then opening a new thread would get the best possible attention.

It’s clear to me that the way to go is to format the whole drive with btrfs and to assigne to subvolume for the / (root) and /home partitions.
By following the graphical installer is then Opensuse also creating a small /boot partition for grub2 to work?
This way I would loose the benefits to feed btrfs with the whole drive (oh well, I’m almost forgetting the swap partition!).

Well I very recently installed a fresh 13.2 using the Network CD, in a VirtualBox VM, taking all the Installer’s defaults. I did tick the box to use the additional repos online during installation (nice new feature), to get the latest updated system. I used a 10GB virtual disk (.vdi), and yes, that is far too small for a regular system.

It gave me: sda1 for swap 1GB; sda2 for root formatted to btrfs 9GB; all default subvolumes including / (root) and home. It did not offer me a separate /home, possibly because it’s a VM installation, and its subvolume setting for the included home was a sensible default.

I wanted to check the latest default Snapper configuration, but unfortunately it didn’t install anything in /etc/snapper/configs, so no snapshots or hidden directory (/.snapshots). Again that may be due to VM installation or too small a partition. It had installed the main Snapper program and library.

It didn’t propose a /boot partition, unsurprisingly as there was no other OS installed to boot. I suppose you could theoretically put Swap partition on a separate device, if there is one suitable (see next comment).

This is gonna be an installation on a netbook (SSD) providing also a SD in-built reader, should I use I high performance SD card for /boot and grub2 and would be the installer able to help in setting up.

Sorry, not used a netbook, SSD, or SD card for that. Hopefully @malcolmlewis will see this thread. I know he has that experience, and used SSD from when we were testing Btrfs back on openSUSE 12 series up to current release. :slight_smile:

I suspect that no home offered was because of a small Virtual drive. In 10 gig you are not going to have much in home any way LOL

You can have all on one partition, i.e. / and /home, AND keep your own data on a separate partition using a file system of one’s own choice.

Don’t see much point in that at all either put it all on one partition or split up the system and user files to two or more partitions. You also may want separate partitions for large data sets ie databases or web sever files. Once they get all that they say that BTRFS done ( yep it ain’t fully backed yet) you will be able to do some fancy stuff. But as of today it is just another file system and speed wise it is not better or worse then ext4. You can do the equivalent of sub volumes with LVM containers and they work also as encrypted and also extendable containers. Two things promised for BTRFS in the future. They also plan some sort of RAID/mirror option. AFAIK it still does not quite work yet. It does appear to be stable and that is good for any FS.

I still have not found a good justification of using potentially ~1/2 the partition for snapper for the general desktop installation. It is way over kill for the desktop. Maybe for a developer it makes sense since they are constantly changing stuff. But for the general desktop user who only does updates from the repos it is just overkill. They can more easily roll back via Yast or zypper

Probably, and I didn’t want another VDI anyway. I was actually left with 4GB out of the 9GB root, that is plenty for testing.

As for Snapper defaulting with no configuration, that’s more likely to be VM awareness. V’Box provides its own snapshot facility anyway.

It’s useful for multi-booting. The separate data partition can be shared, leaving user settings (DE and applications) in the internal /home of their respective operating systems. It avoids complications in that situation.

For a netbook user with limited device capacity that may not matter, but it might make sense to separate out static personal data onto portable media.