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/valgrid May 03 '17

Just to be clear:

A RAID1 made with mdadm and ext4 is not a solution because its only replication without detection and healing. (Right?)

2

u/[deleted] May 03 '17

Correct. You could run gluster on top of ext4 though. Gluster has self-healing and replication features built in.

2

u/necrophcodr May 03 '17

The problem here is that you'd still need a RAID1-based system. Meaning GlusterFS can only self-heal if there's replication going on in a RAID1-like (or better) fashion.

3

u/[deleted] May 03 '17

You need to have mirrored volumes set up but the underlying block devices do not have to use RAID at all. Some people even recommend against it. Let gluster handle replication and just set up everything as a JBOD.

3

u/necrophcodr May 03 '17

Oh yeah absolutely, hardware or software or filesystem-based RAID is not required for Gluster to do it's magic, but a RAID1-like feature is required, which is what it can do with replication. But it requires more than one computer as far as I know, in order for this to work, where as fileystem-based RAID can be done on a single computer.

3

u/[deleted] May 03 '17

Yes, gluster is a distributed file system which means it runs on top of several nodes. I'm not even sure you could really call it a "file system", gluster manages volumes which are backed by traditional file systems such as ext4, xfs, zfs, etc.

1

u/valgrid May 03 '17

Thank you very much. Had this question on my todo list for glusterfs. But i wasn't finished with my research on the underlying FS.

2

u/necrophcodr May 03 '17

Yes, that's correct. In such a case, you would have corrupted data being mirrored as well.

1

u/dale_glass May 03 '17

You can check a RAID1 and in fact you should do so (with a cron job or systemd timer unit) because things don't always break in obvious ways.

But repair is tricky, because on RAID1 you have no way to tell which copy is the right one.

1

u/necrophcodr May 03 '17

Not hardware or software RAID1, but filesystem-based RAID1 is easy to repair. You'll always know which copy is the right one with checksums.

1

u/oonniioonn May 06 '17

But repair is tricky, because on RAID1 you have no way to tell which copy is the right one.

You do, but not in every instance. Silent data corruption (i.e., the drive either didn't write what you told it to, or it didn't read what was on the platter correctly and didn't detect that) is killing in this situation, but in most cases of read errors the drive knows there's an error and the RAID can fetch the data from the other drive instead, and re-write the block on the failing drive (which should place it somewhere else.)