setup:
mkfs.btrfs /dev/sdb
mkfs.ext4 /dev/sdb && mount /dev/sdb /ext4
mkfs.btrfs /dev/sdc /dev/sdd
test case:
mkfs.btrfs /dev/sdc /dev/sdd
problem:
mkfs is fine, however reports the following error ..
---
ERROR: unable to scan the device '/dev/sdb' - Device or resource busy
ERROR: unable to scan the device '/dev/sdb' - Device or resource busy
---
findings:
First, since previously we have had multi-device btrfs,
so mkfs.btrfs would trigger scan for its partner to check
if its mounted.
Next, since previously we had btrfs on sdb and mkfs.ext4
does not overwrite super-block mirror 1.. so
btrfs_read_dev_super(int fd, struct btrfs_super_block *sb, u64
sb_bytenr)
finds btrfs on sdb. So we try to register sdb with the ioctl
BTRFS_IOC_SCAN_DEV and fail.
unless I am missing something. wipefs (along with the below patch)
[PATCH][v2] Btrfs: wipe all the superblock [redhat bugzilla 889888]
seems to be only solution as of now.
Any idea if there can be a better solution to handle stale btrfs
and can be done with in the btrfs limits.
Thanks, Anand
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html