Public bug reported: I'm running gprecise and have e2fsprogs 1.42-1-ubuntu2 installed.
I ran e2fsck -E discard /dev/sdb1 and it destroyed much of the filesystem. I believe the bug that causes data loss is fixed in e2fsprogs 1.42.2. Related upstream changelog entry follows: E2fsck has a number of bugs relating to discard that have been fixed. (1) Fixed a bug which could cause e2fsck to discard portions of the inode table which were actually in use. (2) E2fsck will now avoid using discard if the block device doesn't zero data on discard, since otherwise this could cause problems if the file system gets corrupted in the future. (3) E2fsck will now avoid using discard when it is run in read-only mode. (4) Fixed a bug which caused e2fsck to not issue discards in the last block group. Is it possible to bump e2fsprogs to 42.2? antarus@goats4 ~ $ apt-cache policy e2fsprogs e2fsprogs: Installed: 1.42-1ubuntu2 Candidate: 1.42-1ubuntu2 Version table: *** 1.42-1ubuntu2 0 600 http://ubuntu-precise.mirror.corp.google.com/ubuntu/ precise/main amd64 Packages 100 /var/lib/dpkg/status antarus@goats4 ~ $ lsb_release -rd Description: Ubuntu 12.04.1 LTS Release: 12.04 I expect the discard option to not cause data loss. ** Affects: e2fsprogs (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1083217 Title: Please backport -E discard fixes to e2fs-progs in precise To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/e2fsprogs/+bug/1083217/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs