this post was submitted on 30 Jan 2024
74 points (100.0% liked)

Linux

47300 readers
747 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

cross-posted from: https://programming.dev/post/9319044

Hey,

I am planning to implement authenticated boot inspired from Pid Eins' blog. I'll be using pam mount for /home/user. I need to check integrity of all partitions.

I have been using luks+ext4 till now. I am ~~hesistant~~ hesitant to switch to zfs/btrfs, afraid I might fuck up. A while back I accidently purged '/' trying out timeshift which was my fault.

Should I use zfs/btrfs for /home/user? As for root, I'm considering luks+(zfs/btrfs) to be restorable to blank state.

you are viewing a single comment's thread
view the rest of the comments
[–] 0x0@social.rocketsfall.net 7 points 7 months ago (2 children)

I did my first BTRFS setup over the weekend. I followed the Arch wiki to set up what I thought was RAID 1 only to find out nearly a TB of copying later that it was splitting the data between the drives, not mirroring them (only the metadata was in R1.) One command later and I'd converted the filesystem to true RAID 1. I feel like any other system would require a total redo of the entire FS, but BTRFS did it flawlessly.

I'm still confused, however, as it seems RAID 1 only works with two drives from what I've read. Is that true? Why?

[–] drwho@beehaw.org 7 points 7 months ago

That is not the case. In the context of btrfs, RAID-1 means "ensure that two copies of every data block are available in the running volume," not "ensure that every bit of both of these drives is identical at all times." For example, I have a btrfs volume in my server with six drives in it (14 TB each) set up as a RAID-1/1 (both data and metadata are mirrored). It doesn't really matter which two drives of the six have copies of a given data block, only that two copies exist at all.

Compare it to... three RAID-1 metadevices (mdadm), with LVM over top, and ext4 (let's say) on top of that. When a file is created in the filesystem (ext4), LVM ensures that it doesn't matter on which pair of drives it was written, and mdadm's RAID-1 functionality ensures that there are always two identical copies of the file (on two identical copies of a drive).

[–] Verat@sh.itjust.works 1 points 7 months ago* (last edited 7 months ago)

Iirc they added raid1c3 raid1c4 etc to make raid 1 work with more copies.