From: Christoph Hellwig <hch@infradead.org>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Christoph Hellwig <hch@infradead.org>,
Andreas Dilger <adilger@sun.com>,
Chris Mason <chris.mason@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Notes on support for multiple devices for a single filesystem
Date: Wed, 17 Dec 2008 10:08:13 -0500 [thread overview]
Message-ID: <20081217150813.GA2858@infradead.org> (raw)
In-Reply-To: <ac3eb2510812170650j404edfb1h38aa86bbe3ffa2e@mail.gmail.com>
On Wed, Dec 17, 2008 at 03:50:45PM +0100, Kay Sievers wrote:
> Sounds all sensible. Btrfs already stores the (possibly incomplete)
> device tree state in the kernel, which should make things pretty easy
> for userspace, compared to other already existing subsystems.
>
> We could have udev maintain a btrfs volume tree:
> /dev/btrfs/
> |-- 0cdedd75-2d03-41e6-a1eb-156c0920a021
> | |-- 897fac06-569c-4f45-a0b9-a1f91a9564d4 -> ../../sda10
> | `-- aac20975-b642-4650-b65b-b92ce22616f2 -> ../../sda9
> `-- a1ec970a-2463-414e-864c-2eb8ac4e1cf2
> |-- 4d1f1fff-4c6b-4b87-8486-36f58abc0610 -> ../../sdb2
> `-- e7fe3065-c39f-4295-a099-a89e839ae350 -> ../../sdb1
>
> At the same time, by-uuid/ is created:
> /dev/disk/by-uuid/
> |-- 0cdedd75-2d03-41e6-a1eb-156c0920a021 -> ../../sda10
> |-- a1ec970a-2463-414e-864c-2eb8ac4e1cf2 -> ../../sdb2
> ...
Well, it's not just btrfs, it's also md, lvm and xfs. I think the right
way is to make the single node for the /dev/disk/by-uuid/ just a legacy
case for potential multiple devices. E.g. by having
/dev/disk/by-uuid/
0cdedd75-2d03-41e6-a1eb-156c0920a021 -> ../../sda10
0cdedd75-2d03-41e6-a1eb-156c0920a021.d
foo -> ../../sda10
bar -> ../../sda9
where foo nad bar could be uuids if the filesystem / volume manager
supports it, otherwise just the short name for it.
> For recue and recovery cases, it will still be nice to be able to
> trigger "scan all devices" code in btrfsctrl (own code or libbklid),
> but it should be avoided in any normal operation mode.
Again, that's something we should do generically for the whole
/dev/disk/ tree. For that we need to merge libvolume_id and libblkid
so that it has a few related but separate use cases:
- a lowlevel probe what fs / volume manager / etc is this for
the udev callout, mkfs, strip size detection etc
- a way to rescan everything, either for non-udev static /dev case
or your above recovery scenario
- plus potentially some sort of caching for the non-recovery static
/dev case
I've long planned to put you and Ted into a room and not let you out
until we see white smoke :)
next prev parent reply other threads:[~2008-12-17 15:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 12:18 Btrfs trees for linux-next Chris Mason
2008-12-11 2:34 ` Chris Mason
2008-12-11 3:14 ` Stephen Rothwell
2008-12-11 4:06 ` Andrew Morton
2008-12-11 5:55 ` Stephen Rothwell
2008-12-11 14:43 ` Chris Mason
2008-12-15 21:03 ` Andreas Dilger
2008-12-15 22:55 ` Kay Sievers
2008-12-16 1:37 ` Chris Mason
2008-12-16 1:39 ` Kay Sievers
2008-12-17 13:23 ` Notes on support for multiple devices for a single filesystem Christoph Hellwig
2008-12-17 14:50 ` Kay Sievers
2008-12-17 15:08 ` Christoph Hellwig [this message]
2008-12-17 15:33 ` Kay Sievers
2008-12-17 14:53 ` Chris Mason
2008-12-17 19:53 ` Andrew Morton
2008-12-17 20:58 ` Chris Mason
2008-12-17 21:20 ` Kay Sievers
2008-12-17 21:26 ` Chris Mason
2008-12-17 21:27 ` Jeff Garzik
2008-12-18 21:22 ` Bryan Henderson
2008-12-17 21:24 ` Andreas Dilger
2008-12-17 21:30 ` Jeff Garzik
2008-12-17 21:41 ` Chris Mason
2008-12-22 1:59 ` Liu Hui
2008-12-17 22:04 ` Andreas Dilger
2008-12-17 22:19 ` Dave Kleikamp
[not found] <e1f6055f0812181336q105b4ebcy81d72edd2a35baa8@mail.gmail.com>
2008-12-19 19:03 ` Bryan Henderson
2008-12-19 19:30 ` Chris Mason
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=20081217150813.GA2858@infradead.org \
--to=hch@infradead.org \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).