Final Result: 2 SSD's on a laptop + BtrFS pseudo-raid BOOT

Hi All: I had been experimenting with using two SSD’s (two Samsung 870’s; 2TB) on a HP ZBooK 15 i7-4700MQ laptop using BtrFS.

I was primarily after two things - redundancy (self-healing of all disc errors - which apparently requires a type of btrfs-raid) and a flat file system between the two drives. The flat file system is to avoid issues with partition sizing and having to move files around… (this interferes with regular data backups b/c of user-confusion). Apparently the btrfs-raid is still a no-go on these SSD’s, and I specifically wanted to use these SSD’s b/c of reputation for reliability. So the only thing I could do was attempt a flat file system between the two drives during install…

I had a lot of trouble during several installs, until I found the secret, which exists (at least) in 15.3: During install onto bare metal, choose Guided Partitioning (I think that’s the right title). I had always manually partitioned my drives, but I was unable to come out with an easily-booted system doing this with BtrFS spanning 2 drives. With Guided Partitioning, you can instruct the installer to use all drives, and it will, apparently by default, form a single large BtrFS partition spanning the drives.

There’s also another advantage - you can edit fstab afterwards to add –compression=lzo to your root partition in order to get more HD space! I have found it doesn’t slow things down perceptively - possibly due to the use of SSD’s, (which are very fast).

Easypeasy! And how it’s the closest to an easily-booted system that I have achieved so far. You must (apparently) choose UEFI ONLY as a BIOS option on your laptop before installing - or else you’ll wind up with an install in which you have to boot several times while trying to find the right EFI file from which to boot, using UEFI hotkeys. (I was unable to get any boot at all, post-install, when I chose “BIOS legacy” boot.) But even with UEFI - it will report “no operating system found” so you have to activate the UEFI Boot Manager by using the correct UEFI hotkey at power-on… Then you get the options to boot from drives, a EFI file, or “opensuse.” Thus, it only takes minimal user-intervention to actually get the system to boot - but the process is reliable.

So boot still isn’t totally automatic - but it’s reliable. Backups are super easy-because you just backup any desired parts of the filesystem (using rsync) to a big USB external drive. If you format that external drive with BtrFS, you can mount it (in fstab) with –compression=lzo to make even more space. You can also do snapshots of the laptop drive (I haven’t tried this yet) and partition the external backup drive for data+metadata redundancy (which cuts the size of the hard drive in half, although some space is recovered with –compression=lzo).

It appears BtrFS still isn’t fully-integrated into BIOS/UEFI. I’d be interested if spinning HD’s could be used in RAID0 (striping) to get much faster access times - if so, it might be worth replacing SSD’s with (larger) spinning drives in order to obtain at least metadata redundancy (for FS-level automatic error-correction). Also, it would be useful to know if hybrid SSHDs are fully integrated into BtrFS raid setups (for increased speed over spinning HDs). A pair of 4TB spinning drives would give the same size as my current SSD system if set for full data + metadata redundancy and autocorrection - and may be fast when using raid0. But so far it’s unclear whether btrfs-raid0 offers the speed advantage of traditional raid0.

HDDs are too slow for Btrfs. RAID will not help with that.

I guess I misinformed everyone! My apologies!! I wasn’t doing RAID - I was doing a single volume spanned across two Samsung 870 SSDs on my HP ZBook laptop. The need for spanning is to have a single partition to avoid the problem of managing several partitions as data needs on individual partitions change.

So there’s no RAID, per se (I think) unless… I think that this spanning might be called something like “JBOD?”
Also, I wanted data compression of BtrFS.
Also I wanted the error detection of BtrFS.

But there’s still two problems. Even though it’s a pretty vanilla BtrFS setup - just the default opensuse installer’s device-spanning for BtrFS - there’s:

  1. No auto-boot. When the system boots, the UEFI says there’s no installed OS. The way I boot is to hit F9, get the “boot loader,” and THEN I can boot opensuse as one of the options.
  2. Every day or three, the system literally freezes for a few minutes to 10 minutes or so while a bunch of BtrFS utilities run. (btrfs-cleaner and some others I can’t remember right now - but I can view these as they run if I invoke the System Monitor when the system unfreezes briefly from time to time while these are running. There are plenty of free CPU cycles - but rather, it’s as if the FS can’t be accessed by KDE, etc. when these utilities are running)

I guess these are relatively minor problems given the benefits of data-compression, error-detection, and volume-spanning. Still, I wanted to mention!

If you want help - provide useful info, such as

inxi -aSMCmDjIz

System needs at least 2 partitions - one for boot, one for all other.
Samsung 870 QVO are QLC => slow.
Samsung SATA SSDs have flaws, especially with ATI disk controllers.

I tried the inxi -aSMCmDjIz and the result was thousands of lines and wouldn’t fit in a reply box, even when commented as “code.”
Then I got sidetracked…:shame:

patti@linux-lhkc:~> lsblk 
NAME                                                     MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT 
sda                                                        8:0    0   1.8T  0 disk   
└─sda1                                                     8:1    0   1.8T  0 part   
  └─cr_ata-Samsung_SSD_870_EVO_2TB_S620NG0R204464B-part1 254:1    0   1.8T  0 crypt  
    └─system-root                                        254:3    0   3.6T  0 lvm   /var 
sdb                                                        8:16   0   1.8T  0 disk   
├─sdb1                                                     8:17   0   512M  0 part  /boot/efi 
└─sdb2                                                     8:18   0   1.8T  0 part   
  └─cr_ata-Samsung_SSD_870_EVO_2TB_S620NG0R204465D-part2 254:0    0   1.8T  0 crypt  
    ├─system-swap                                        254:2    0  14.9G  0 lvm   [SWAP] 
    └─system-root                                        254:3    0   3.6T  0 lvm   /var 
sdc                                                        8:32   0 931.5G  0 disk   
└─sdc1                                                     8:33   0 931.5G  0 part  /run/patti/Samsung_1TB 
sdd                                                        8:48   0   4.5T  0 disk  /run/patti/BtrFS_5TB4 
sde                                                        8:64   0   4.5T  0 disk   
└─sde1                                                     8:65   0   4.5T  0 part  /run/patti/BtrFS_5TB10 
patti@linux-lhkc:~> inxi 
**CPU:** Quad Core Intel Core i7-4700MQ (-MT MCP-) **speed/min/max:** 3119/800/3400 MHz **Kernel:** 5.3.18-59.40-default x86_64  
**Up:** 13:18:09  up 1 day  1:45,  6 users,  load average: 4.28, 4.13, 3.69 **Mem:** 3344.0/15270.3 MiB (21.9%)  
**Storage:** 13.65 TiB (35.7% used) **Procs:** 412 **Shell:** bash 4.4.23 **inxi:** 3.1.00  

About the slow running of btrfs-cleaner, btrfs-transacti, etc. … I was thinking if I could schedule it to run at night - then it might not happen “randomly” during usage hours. But I couldn’t find anything in the BtrFS docs suggesting such a thing was possible.

The no auto-boot just seems to be a thing when you have BtrFS spread across a couple of disks which includes the boot disk. I’ve installed 15.3 a few times using the “automatic” setup - as long as both disks are BtrFS, then YaST automatically installs across both disks. (which is preferred) If you request encryption, it needs the pwd entered three times - apparently to unlock each disk and then to unlock the partition for the OS.

I did try a pair of WD Green (5200) spinning disks and the system was frustratingly slow. Not sure if due to BtrFS or lzo compression. Now I’m ack to SSD’s.

Additional comments:

(a.) Must learn snapper! (luckily, it’s straightforward)

(b.) In order to prevent btrfs-cleaner and btrfs-transacti from running almost daily and halting KDE for minutes to hours, even when I was very busy on the computer, I had to disable the “automatic” snapshots. This seems to have solved the problem as this has not happened now inseveral days.
An example guide to doing this is here:
(I think there’s an opensuse guide containing essentially the same information)

I don’t know how much of (b.) is related to my btrfs filesystem spanning a pair of SSDs (Samsung 870s).

The downside is you have to do all snapshots yourself, but that’s OK.