Tumbleweed: Possible to have /home in separate partition during install?

Woah - that is a super great question and sounds like a super fun experiment!

Now I am curious… I am starting to churn some ideas in my brain on how this could be used for a system without having to reboot a full local (such as use of vms) or if just simpler to set up some kind of simple raspberry kit with a USB as well as the internal microSD card that the OS resides on.

Though, considering that… would that be equal? I am assuming yes since you could use two different OS versions (micro TW and micro LEAP - if those are available, but based on this it seems so HCL:Raspberry Pi4 - openSUSE Wiki) via two separate microSD’s but still hosting the same USB which would be the shared /home drive.

Worse part about life: too many projects, not enough time. lol

No worries, and I am definitely too! (as is easily shown in my poor use of proper terminology)

Yes, my understanding was under a different awareness/perspective. My opinion should be disregarded since you are accurate to awareness mistake on my part that I was considering two active/different storage locations rather than separating the same under the same use storage.

Sorry for my mistake. I hope you all the best. :slight_smile:

1 Like

I made the switch to Tumbleweed Gnome 2 weeks ago. So far so good. Dash to Panel working great. Snapshots are great. I ended up putting my root and home on the same drive and same partition; so far that layout is working fine.

That is how I do it. I have always done it that way, many years. I have never had any problems (no cons). My System and My /home Partitions are a modest size, and have never filled up. One reason for it not filling up is that I created a separate DATA partition, a HUGE one, and all DATA goes there.

Here is a quick glance at my partitioning scheme, with data percentages included:

2 Likes

Oh, @invalid_user_name , I better hasten to add that I personally do not use BTRFS. I believe you would need to use a lot larger / partition if you do, because (I think) it quickly fills up with BTRFS Snapshots.

My backup scheme suits me fine.

In my case, I partition the drive the way I want it BEFORE I even install, then tweak the mounts using the partition manager in the installer.

1 Like

I ended up using one partition for everything, and Btrfs handles the various subvolumes. So far it’s working good. Snapshots are awesome.

1 Like

Yes! I’d love to have more time to learn more Linux and do little projects. But my life is filled with wonderful other commitments.

I have one Btrfs partition that has all the various subvolumes. Correct me if I’m wrong, but my vague understanding is that Btrfs will grow the root subvolume and shrink the home subvolume if root approaches its size limit.

I’ve been deleting my old snapshots. And Btrfs auto deletes the old snapshots it auto creates.

1 Like

That is incorrect. All subvolumes equally share the same available physical space. They do not have “size” to grow or shrink.

1 Like

Hi.

No. You have one partition and it’s all. Some volumes are excluded from snapshot (i.e. /home) and others are snapshots from the system itself (/.snapshots). In the first case, you even can have different settings in any subvolume.

Well, btrfs makes a good work in this but it’s not perfect. Most useful snapshots are the biggest ones! I.e. after a big update.

1 Like

Yes, those are created automatically and I think the old ones are deleted automatically.

You need to understand BTRFS. It is based on Btrees thus sub trees (subvolumes ) are not separated. The blocks are intermingled. If you use separate partitions there is physical distance between the blocks that make up the FS. Also if you change distros or other major changes a separate home is very very useful since you mount it separate from / and your data can be preserved and used by any other Linux.

Having all on one partition makes installing a bit simpler since you don’t have to think about partitions.

Pluses and minuses :man_shrugging:

1 Like

000000000000
Hi Bing Chat. Does the btrfs root subvolume automatically grow when it gets full?

Bing Chat answer: Yes, the Btrfs (B-tree file system) root subvolume does automatically grow when it gets full. This is because Btrfs subvolumes do not require pre-allocation of space (1). They are part of the Btrfs pool of storage and grow and shrink as needed (2). However, it’s important to note that while the subvolume can grow, if the overall Btrfs pool is full, you will still run out of space. Therefore, monitoring the overall usage of your Btrfs file system is crucial.

https://wiki.archlinux.org/title/Btrfs
000000000000

Is Bing Chat hallucinating? I understand that the overall Btrfs partition size is the hard limit. But if there’s free space within the Btrfs partition, then it seems that the Btrfs root subvolume can grow if needed. Let me know if Bing Chat got this wrong. In any case, I made myself a reminder to periodically prune old snapshots.

@invalid_user_name the partition running btrfs can be resized… Check your system with btrfs filesystem usage / I don’t use snapshots, I have a 60GB partition for / some are also xfs for other stuff (libvirt, docker, home etc). I have 37GB allocated at present… so I could if wanted resize that to 40GB if I wanted too…

1 Like

Cool. Thanks. More for me to research. :hatching_chick:

Let me use the translator here, although if there are strange glitches it will be its fault :wink:

btrfs is a complex file system. Maybe if you at least have experience with LVM (logical volume management) it is easier not to get stuck in misunderstandings, but without that it is usually not so easy to understand it.

You always have a physical volume. Let’s say a disk that the kernel mounts as /dev/sda. For simplicity, we are not even going to partition it and deploy btrfs on it. It’s not that you have a partition: the entire disk IS that partition. And you mount it as the root of the system. Let’s forget EFI partitions, boot and so on.

In this case, /dev/sda is the physical volume, and / is a volume created and mounted on the physical volume. It doesn’t matter whether you call it a “subvolume”, and there is another reason: each snapshot is a subvolume in its own right and can be mounted at any time. But let’s put this aside for a while. Let’s go back to the root /. According to the usual file hierarchy, we will have file systems such as /etc, /usr/local, /usr, /var, /home. Let’s stop at the latter. There we not only save our user configurations, but all the files. In particular, those that we download and save, whether large or small. So if we take snapshots of our system, it is very likely that we want /home to be left out, because otherwise the snapshots would be too large to be useful because they would eat up our disk space very quickly. So we tell the system “hey, don’t take snapshots of /home”, and we do that by mounting a specific subvolume for /home. But it is important to understand here that the physical space for / and /home is the same. If you have 900 GB free in / you will have them in /home, and if you have 20 GB free in /home you will have them in /. And if you run out of space, you either delete files or you will have to add more physical space to the volume (subvolume) /

Although you can use subvolumes for more things, the truth is that preventing them from taking up space in snapshots is probably the most common thing to do. The confusion comes from the fact that from btrfs’ point of view, everything is a subvolume. For example, the location of the snapshots themselves. That is what makes it possible for you to ask the system to mount a snapshot taken two months ago as / and to boot the system like this. So you can think of what you mount on / as “the main subvolume” and the others as “subvolumes within the original subvolume” and it might be easier to understand it that way. Curiously, it is how you would expect it to work: if you do not use subvolumes, you do not expect to have to distribute space between /, /var, /usr… well with subvolumes this is still the case: you have everything or nothing.

That said, one of the cool things about btrfs is that you can always resize the main subvolume. You have a Windows computer to which you have added Linux to a partition at the end of the disk and you want to incorporate the space that Windows occupied: easy, there are two ways to do it: delete the partitions, create one and add it to / and the other consists of simply incorporate the partitions a/as-is. You can add or remove partitions or even entire disks (physical space) to/regardless of their physical location. You can have, for example, three partitions of one disk and two full disks. In this case, your “volume” (or main subvolume) would be made up of:

  • /dev/sda2 (1GB)
  • /dev/sda3 (50GB)
  • /dev/sdb (1000GB)
  • /dev/sdc (2000 GB)

That would be a 3051 GB btrfs volume (you could call it, for example, root-osuse) and you could mount it as /, and as options you can tell it to create subvolumes for /var/log, /usr/local and /home. In that case, you would have 3051 GB available for the entire system, be it /, /home, /var/log or /usr/log. It may be that you work with multimedia projects and suddenly in /home/tux/projects/ you have files that occupy 3000 GB and in that case you will quickly run out of space on the system. But no problem: you can add a new 4000 GB /dev/sdd disk and add it to “osuse-root” and now you will have a total space of 7051 GB for the entire system and about 4000 GB free (plus whatever you still had free ).

Ok, as far as I know you can’t give a name like osuse-root to the main volume and I’ve simply used that rhetorical device because I think it’s easier to explain it that way. Now go to YaST → System → Partitioner and take a look, look at the left column. Among other things, you will have two related entries: one is disks and another is btrfs. Check the difference between the two. That’s the way it works. In CLI, to indicate btrfs that you need change the main volume, you use “filesystem [mount-point]”.

1 Like

Wow. That’s a pretty good summary of Btrfs technology. As a non-technical Linux user, I’m focused on just doing my work and only learning what’s needed to keep my system running smoothly. But it’s really nice to get a sense of the amazing technology that goes into something like Btrfs. I’m happy I switched to TW and can easily restore a snapshot if needed. I’ve got about 1.2TB of free space on my Btrfs partition so I’ll scrap my reminder to delete old snapshots.

:slightly_smiling_face: Just kidding. I like to keep things clean and tidy so I’ll keep deleting. And when I get free time, I’ll dive into some of those little Linux projects I’ve put on my todo list.