[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
My intention was to attempt to recover a filesystem. It just happened to be the wrong block device on which there was a functioning LUKS partition. Being defensive to prevent such a circumstance would call for two things: cryptsetup forcing a user to write zeros so such a situation isn't created in the future, and e2fsck checking for a LUKS partition and re-verifying the user really wants to continue despite there being a LUKS header and backup superblocks on the partition. If such checks can be added without additional dependencies, I think they just might prevent future similar mishaps. Maybe this mistake doesn't commonly happen, but this configuration of layering ext4 on LUKS is the default for most linux distributions, even for USB and external drives. In fact, e2fsck could've figured out through lsblk what I was really trying to do and corrected me. I had a relatively simple configuration. It wouldn't have been that hard to figure out what I was doing was wrong. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
I have to disagree; the only tool that uses the backup superblock is e2fsck, and if you accidentally run wipefs on the volume, you should be able to recover it with e2fsck. If you don't want to attempt to recover a filesystem there, then don't run e2fsck. ** Changed in: util-linux (Ubuntu) Status: New => Invalid -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
Ah, well, the whole thing is more of a stupid lesson learned. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
FYI libblkid/blkid detects LUKS for years already. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
You are correct, not running atleast wipefs before using luksFormat on the block device was a mistake on my part, but I barely remember making it. I half expected fsck to come up with some errors, so I let it make changes. It is not a volume that is always connected at startup, hence the manual check. It was just the wrong block device. An isLuks check would have returned yes and prevented fsck from running. Maybe libblkid could detect luks partitions? This happened on a 2 drive raid 1 array, which I have dd backups of, if some how the array can be recovered. Hard lesson learned though. Thank you for the explanation. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1713175] Re: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition
** Summary changed: - fsck should check before running on an encrypted LUKS partition + Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1713175 Title: Obsolete backup ext2/3/4 superblocks can confuse e2fsck on an encrypted LUKS partition To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/1713175/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs