From: Karel Zak <kzak@redhat.com>
To: Hugo Mills <hugo@carfax.org.uk>, Christoph Groth <cwg@falma.de>,
linux-btrfs@vger.kernel.org
Subject: Re: "Invalid argument" when mounting a btrfs raid1 filesystem
Date: Mon, 26 Mar 2012 10:51:34 +0200 [thread overview]
Message-ID: <20120326085134.GK2040@x2.net.home> (raw)
In-Reply-To: <20120324182104.GB14080@carfax.org.uk>
On Sat, Mar 24, 2012 at 06:21:05PM +0000, Hugo Mills wrote:
> As Sadner says, you have to run "btrfs dev scan" before you try to
> mount the FS. If you have root on btrfs, this will have to go in an
> initrd; otherwise, it can go in your initscripts anywhere before the
> non-root filesystem mounts.
>
> Basically, the kernel needs to know which devices hold which btrfs
> filesystems (organised by UUID) before it tries to mount them. So,
> there's an ioctl that is used for sending that data to the kernel, and
> a userspace tool (btrfs dev scan) that enumerates all of the block
> devices it can see, looks for a btrfs superblock on them, and tells
> the kernel.
Please, move all this logic to udev rules where we already scans all
devices. It's really bad to scan all device more than once. We spent
years to fix this problem for LVM, I don't think that btrfs has to
repeat the same mistakes.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2012-03-26 8:51 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-24 17:40 "Invalid argument" when mounting a btrfs raid1 filesystem Christoph Groth
2012-03-24 18:16 ` Sander
2012-03-24 18:21 ` Hugo Mills
2012-03-24 18:58 ` Alex
2012-03-24 22:26 ` Christoph Groth
2012-03-26 8:51 ` Karel Zak [this message]
2012-03-26 15:00 ` Calvin Walton
2012-04-09 11:58 ` Martin Steigerwald
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=20120326085134.GK2040@x2.net.home \
--to=kzak@redhat.com \
--cc=cwg@falma.de \
--cc=hugo@carfax.org.uk \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).