Page 1 of 1

Linux data loss, RAID, SSDs, discard mount option?

PostPosted: Thu May 21, 2015 1:23 pm
by Zancarius
There's a lot of interesting stuff going on at the moment, but since last night it looks like the problem has been narrowed down.

Here's the bug report:
https://bugs.debian.org/cgi-bin/bugrepo ... bug=785672

Miscellaneous links:
https://bbs.archlinux.org/viewtopic.php?id=197400
https://lkml.org/lkml/2015/5/20/910
https://lkml.org/lkml/2015/5/21/167
https://bugzilla.kernel.org/show_bug.cgi?id=98501
https://www.mail-archive.com/linux-kern ... 86512.html (Lovely that it was backported to 3.x huh?)

So, the gist of it is that if you're running ext4 on SSDs and have a fairly recent kernel (3.16, 3.19, 3.4, 3.6, 4.0.x), there's a chance that some file system extents will be zeroed leading to data loss (and an extent can be up to 128MiB in size--ouch). Apparently, though, the problem appears to most often hit systems configured with RAID-0 and/or mounted with the discard option enabled. Sometimes enabling trim (or using fstrim) seems to contribute.

As I understand it, a proper fix hasn't yet landed in the kernel but is expected some time today or tomorrow.