lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081217150813.GA2858@infradead.org>
Date:	Wed, 17 Dec 2008 10:08:13 -0500
From:	Christoph Hellwig <hch@...radead.org>
To:	Kay Sievers <kay.sievers@...y.org>
Cc:	Christoph Hellwig <hch@...radead.org>,
	Andreas Dilger <adilger@....com>,
	Chris Mason <chris.mason@...cle.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	linux-kernel@...r.kernel.org, linux-btrfs@...r.kernel.org,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: Notes on support for multiple devices for a single filesystem

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 :)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ