Bug 907554
Summary: | btrfs causes subsequent ntfs-3g filesystem to fail | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard W.M. Jones <rjones> | ||||
Component: | kernel | Assignee: | Josef Bacik <josef> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 19 | CC: | aoliva, blair, bugzilla, gansalmon, itamar, jonathan, josef, kernel-maint, lightdot, madhu.chinakonda, mmahut, robatino, sjensen | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | 863978 | Environment: | |||||
Last Closed: | 2013-04-29 18:31:56 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 863978 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Richard W.M. Jones
2013-02-04 17:20:25 UTC
Note if you change ntfs -> ext2, it no longer fails. So there's some sort of bizarre interaction between btrfs and FUSE (used by ntfs-3g). If you change btrfs -> ext2, it also no longer fails, so the error is provoked by the preceding btrfs mkfs/mount. Formatting btrfs volumes without erasing certain (or maybe all) superblocks seems to cause problems. I wonder if this is related to that. In bug 889888, I found that even when using wipefs -a on a btrfs formatted partition, while it was correctly kill it could be resurrected into a zombie btrfs by formatting it as ext4. In my case, all tools including mount saw it as ext4, but btrfs-progs saw it as btrfs. In your case it seems that NTFS formatting a btrfs formatted partition is causing additional confusion. (In reply to comment #2) > Formatting btrfs volumes without erasing certain (or maybe all) superblocks > seems to cause problems. I wonder if this is related to that. In bug 889888, > I found that even when using wipefs -a on a btrfs formatted partition, while > it was correctly kill it could be resurrected into a zombie btrfs by > formatting it as ext4. > > In my case, all tools including mount saw it as ext4, but btrfs-progs saw it > as btrfs. In your case it seems that NTFS formatting a btrfs formatted > partition is causing additional confusion. That is interesting, because inserting a 'wipefs' call before the second mkfs does indeed fix the problem. Here is my new test script: guestfish <<EOF sparse test1.img 1G run part-init /dev/sda mbr part-add /dev/sda p 64 999999 # create /dev/sda1 part-add /dev/sda p 1000000 -64 # create /dev/sda2 mkfs btrfs /dev/sda1 mount /dev/sda1 / umount / wipefs /dev/sda1 # See note mkfs ntfs /dev/sda1 mount /dev/sda1 / EOF Note that I have changed it to create two partitions this time. That's so I can run wipefs on either, to prove that adding the wipefs call didn't just fix things by changing the timing. So it succeeds with wipefs /dev/sda1 and still fails with wipefs /dev/sda2. However note that this is not a dupe of bug 889888. There is still a bug in btrfs, probably in the kernel detection of btrfs superblock magic. Other filesystems don't look at backup superblocks unless you explicitly tell them to. http://www.spinics.net/lists/linux-btrfs/msg21197.html If the first superblock magic field is zero'd, btrfs considers the volume intentionally destroyed. If the first superblock appears damaged, it goes looking for additional superblocks, if they are valid it considers the btrfs volume valid (apparently). So it seems mkfs.ntfs damages btrfs superblocks in a way that causes confusion for mount. This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19 Do you need any input from btrfs? Seems like you just need to use wipefs. (In reply to comment #7) > Do you need any input from btrfs? Seems like you just need to use wipefs. We have worked around this by calling wipefs before each time we use mkfs. I would expect mkfs to wipe out previous signatures, so this is likely something that mkfs will need to fix one day. |