Bug 623092 - btrfs across devices won't be mounted without btrfs module loaded
btrfs across devices won't be mounted without btrfs module loaded
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
x86_64 Linux
low Severity low
: rc
: ---
Assigned To: Josef Bacik
Eryu Guan
: RHELNAK
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-11 06:00 EDT by Eryu Guan
Modified: 2010-08-16 23:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-16 08:51:13 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Eryu Guan 2010-08-11 06:00:58 EDT
Description of problem:
Create a btrfs partition across multiple devices, unload btrfs module, then the mount will fail (btrfs module will be loaded automatically). But mounting btrfs on single device will be done without problems(of cause, without btrfs module loaded)

After this failure mount, all mount will fail even with btrfs module loaded. I have to do btrfsck to make the partition mounted.

Version-Release number of selected component (if applicable):
kernel-2.6.32-59.1.el6.x86_64
btrfs-progs-0.19-11.el6.x86_64

How reproducible:
always

Steps to Reproduce:
# Make sure btrfs is unloaded
modprobe -r btrfs

mkdir -p /mnt/btrfs
dd if=/dev/null of=/home/img0 bs=1G seek=5
dd if=/dev/null of=/home/img1 bs=1G seek=3
for i in 0 1;do losetup /dev/loop$i /home/img$i;done
mkfs.btrfs /dev/loop0 /dev/loop1

mount /dev/loop0 /mnt/btrfs
  
Actual results:
[root@dell-per810-01 ~]# mount /dev/loop0 /mnt/btrfs
mount: wrong fs type, bad option, bad superblock on /dev/loop0,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

[root@dell-per810-01 ~]# dmesg | tail
[snip]
Btrfs loaded
device fsid f14ed90116772672-7a80a1b42439d7b3 devid 1 transid 7 /dev/loop0
btrfs: failed to read the system array on loop0
btrfs: open_ctree failed

Expected results:
Mount successfully

Additional info:
Comment 2 RHEL Product and Program Management 2010-08-11 06:18:28 EDT
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **
Comment 3 Eric Sandeen 2010-08-11 17:08:51 EDT
Looks like one for Josef
Comment 4 Eric Sandeen 2010-08-11 23:09:36 EDT
Talked to Chris tonight; it sounds like this is expected, and the issue is actually that the volume was -mkfs'd- without having the modules loaded, and so things weren't properly scanned.  Josef can probably elaborate.  :)

But it sounds like it's not necessarily indicative of a bug.  (Maybe mkfs.btrfs should ask for the module to be loaded, though, if this is the case?)

-Eric
Comment 5 Josef Bacik 2010-08-16 08:51:13 EDT
Yeah for multi-device volumes you need to have both volumes in cache before mounting will work.  So you need to run btrfsctl -a while the btrfs module is loaded, and then do the mount, otherwise we can't find the second volume the user is trying to mount.
Comment 6 Eryu Guan 2010-08-16 23:04:01 EDT
Eric, Josef, thanks for clarifying this.

I think make mkfs.btrfs issue a warning/load btrfs module would be better then the user would know he is doing wrong (like me :)

Note You need to log in before you can comment on or make changes to this bug.