I recently started encountering HDD errors on one of my disks that I had openSUSE Tumbleweed running atop mdadm software RAID0 across two HDDs. After getting all my data off and reinstalling the system I decided to go with Btrfs and replaced Win10 on the SSD with a fresh openSUSE Tumbleweed install. My system is currently running smoothly but I’d like to make use of Btrfs and the remaining two HDDs (the third HDD with bad blocks and periodic errors has been removed - wouldn’t want to put RAID0 on that) so my goal is to have Btrfs running across all the storage devices with HDDs being configured in RAID0.
From what I see Btrfs RAID0 is possible and there shouldn’t be any problems (Source 1: https://en.opensuse.org/SDB:BTRFS Source 2: https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices). But I haven’t worked with Btrfs enough to be aware of all the gotchas and tricks but I think I’m going about this the wrong way and looking at it as another mdadm RAID with XFS partitions atop it (at least I keep catching myself trying to configure it like one). I tried configuring Btrfs RAID through the Yast Partitioner and managed to create subvolumes to manually mount but as soon as I later try to create more subvolumes (or do any config changes whatsoever), Yast Partitioner demands all previously created subvolumes to be unmounted, nor does it offer the new subvolumes to be mounted so I have to manually add entries in /etc/fstab, that get erased by Yast Partitioner every time I do any changes with it anyway.
Currently my furthest progress was to add in /etc/fstab and manually mount (note the, probably incorrectly, specified subvolumes) but all that got removed from my fstab and the mountpoints unmounted as soon as I wanted to add /ISOs as a subvolume/mountpoint (to keep the install ISOs without repeatedly downloading them all the time and have ~/Downloads folder baloon into hundreds of Gigabytes)
Or maybe Yast Partitioner support for Btrfs is still not mature enough (it seems it’s still WIP for the advanced/non-standard partitioning situations) and only create Btrfs RAID with it but partition and mount the partitions from terminal. Or instead - just drop the idea bout Btrfs RAID, keep the Btrfs on the SSD and go with the good old mdadm RAID and XFS across the HDDs?
Recommend reading it to gain understanding of subvolumes and difference between BTRFS RAID and mdadm (and dmadm)
Although doesn’t really answer your basic question about why your previous configuration of subvolumes is wiped out when you try to add a new subvolume, understanding the logical nature of the BTRFS subvolume may be a clue.
In the end though,
I recommend first that you try to create the new subvolume by command line and see if it works when YaST tools may not.
If the command line causes the same behavior then you’ll know it’s something more fundamental to BTRFS and not a YaST bug.
And if you do determine that it’s a more fundamental BTRFS “feature,” you can ask the BTRFS developers directly, by reputation they’ve been very responsive to any issues and questions sent their way.
To keep my VMs and applications such as games or Docker containers and their data - stuff that I’d like to keep on my SSD but my SSD doesn’t have the size for. Basically, data that can be lost at any given time and rebuilt/reinstalled. At this time I’m doing just that - using MDADM, tho with RAID0 and 2x XFS partitions until I get around to reconfiguring it to work with Btrfs. In addition to directories for VMs and applications/games I also have different working directories that I create/remove as needed whenever I’m testing something - this sometimes requires re-adjusting the partition sizes or creating temporary partitions that I can mount inside VMs, tho lately I’ve been using NFS or GuestFS tools for that instead. For data storage I’m still reviewing HDD drives and will probably go with RAID1 on XFS.
Thanks - these links look very useful, I will look through them. As I mentioned before - initially I did some tinkering with the Yast partitioner and the CLI commands but Yast partitioner kept erasing my adjustments every time I tried adding configuration through Yast partitioner. So it got me worried that either my adjustments are erroneous or that the changes could/would get wiped during some upgrades/updates or whenever I simply have to make quick adjustments in the future and I’ve forgotten about this nuance.