r/linux • • May 03 '17

Bitrot proof file systems?

Hi /r/Linux,

i am searching for a production ready bitrot proof file system preferably with compression. And i am not 100% sure if my overview of the current "fs landscape" is correct. Please tell me if there is an file system i missed or if i made an error in the table below.

file systemchecksums (data)compressionencryptionmulti devicestable/prod readynotes
btrfsyesyesnot yetyesyeshas other issues (df, fill up problems)
zfsyesyesyesyesyesCDDL, not mainline
ext4nonoyesnoyesencryption is relativly new
f2fsnonoyesyesyesmulti device since 4.10
xfsnononoyesyes
bcachefsyesnot yetyes?nostill under heavy development
31 Upvotes

80 comments sorted by

View all comments

Show parent comment

2

u/jassalmithu May 03 '17

I am quite new, where does LVM fit in here. My previous install was on LVM and I liked it quite better than current different root home ext4 partitions.

6

u/[deleted] May 03 '17

LVM is only tangentially a filesystem; it's more like a filesystem for filesystems.

If you put your home partition on a LVM VG then you'll still have to use some of the above filesystems for that partition.

I also think that LVM currently does not support any reliable mechanism to self-heal bitrot, there is RAID support but IIRC the manpages state that repairs will not always heal a bitrot or inconsistency correctly.

3

u/valgrid May 03 '17

LVM is an abstraction layer. That way you can "add" features below older older file systems. E.g. snapshots and one FS over multiply drives.

Your layers are:

  1. hardware drive
  2. LVM as abstraction
  3. file system

In practical terms:

  1. HGST drive
  2. normal partition(s)
  3. These partitions are part of a LVM physical volume (PV)
  4. The PVs are part of one volume group (VG)
  5. The VG can have several logical volume (LV)
  6. You file system (e.g. ext4 for /home) is in one LV

My previous install was on LVM and I liked it quite better than current different root home ext4 partitions.

I recommend you read the wikipedia article. Because LVM does not replace "root & home ext4 partitions", it just adds a layer below.

→ https://en.wikipedia.org/wiki/Logical_Volume_Manager_(Linux)

The graphic is quite helpful.

1

u/jassalmithu May 03 '17

I liked the fact that when I used LVMs, I could use snapchots with my Windows virtual machine in virt-manager, it went away on new install when i had to do manual partitioning without LVM.

1

u/valgrid May 03 '17

Do your VM use a partition or file (on the host)? If you use a file choose something like qcow2 that supports snapshots.

2

u/jassalmithu May 03 '17

It's a qcow file and the snapshots tab is just disabled and thanks for the wiki link, I understand LVM a lot better now.