From: Anand Jain <Anand.Jain@oracle.com>
To: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: [bug] mkfs.btrfs reports device busy for ext4 mounted disk
Date: Fri, 22 Feb 2013 13:29:15 +0800 [thread overview]
Message-ID: <5127022B.6070200@oracle.com> (raw)
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
next reply other threads:[~2013-02-22 5:29 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-22 5:29 Anand Jain [this message]
2013-02-22 19:03 ` [bug] mkfs.btrfs reports device busy for ext4 mounted disk Zach Brown
2013-02-22 22:30 ` David Sterba
2013-03-01 10:18 ` Anand Jain
2013-03-01 10:13 ` [PATCH] btrfs-progs: traverse to backup super-block only when indicated Anand Jain
2013-03-01 17:37 ` Eric Sandeen
2013-03-04 5:20 ` Anand Jain
2013-03-01 18:27 ` Zach Brown
2013-03-27 10:07 ` [PATCH 0/5 v5] access to backup-sb and btrfs' multipath aware Anand Jain
2013-03-27 10:07 ` [PATCH 1/5 v5] btrfs-progs: make btrfs dev scan multi path aware Anand Jain
2013-04-11 9:57 ` [obsoleted] " Anand Jain
2013-03-27 10:07 ` [PATCH 2/5 v5] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-03-27 10:07 ` [PATCH 3/5 v5] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-03-27 10:07 ` [PATCH 4/5 v5] btrfs-progs: introduce passing flags to btrfs_scan_one_device Anand Jain
2013-03-27 10:07 ` [PATCH 5/5 v5] btrfs-progs: disable using backup superblock by default Anand Jain
2013-03-27 23:17 ` [PATCH 0/5 v5] access to backup-sb and btrfs' multipath aware anand jain
2013-04-05 5:54 ` v6: access to backup superblock Anand Jain
2013-04-05 5:54 ` [PATCH 1/5] btrfs-progs: Introduce flag BTRFS_SCAN_REGISTER to replace run_ioctl Anand Jain
2013-04-05 5:54 ` [PATCH 2/5] btrfs-progs: Introduce flag BTRFS_SCAN_BACKUP_SB for btrfs_read_dev_super Anand Jain
2013-04-05 5:54 ` [PATCH 3/5] btrfs-progs: introduce passing flags to btrfs_scan_one_device Anand Jain
2013-04-05 5:54 ` [PATCH 4/5] btrfs-progs: disable using backup superblock by default Anand Jain
2013-04-05 5:54 ` [PATCH 5/5] btrfs-progs: btrfs-find-root should scan backup-sb Anand Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5127022B.6070200@oracle.com \
--to=anand.jain@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.