From: Theodore Ts'o <tytso@mit.edu>
To: Greg KH <greg@kroah.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Hacking linux-utils for swap label
Date: Thu, 13 Apr 2006 14:19:49 -0400 [thread overview]
Message-ID: <20060413181949.GB12176@thunk.org> (raw)
In-Reply-To: <20060413171042.GA16607@kroah.com>
On Thu, Apr 13, 2006 at 10:10:42AM -0700, Greg KH wrote:
> I don't see that requirement anywhere in the vol_id code. It's a
> stand-alone binary that should work with just about any kernel version,
> as it just talks to the block device directly. No udev requirement at
> all (it just happens to live in the udev source tree for now, I think
> that's changing as HAL and some other utilities are starting to rely on
> it.)
The blkid library/program does many things, beyond just simply
identifying the filesystem type, label, and uuid given a particular
device. In particular, the blkid library uses a cache (so you don't
have to scan all of the attached block devices, which in the case of a
system with a truly vast number of san attached storage devices, could
take very long time), so that an application can find a block device
given a particular label or uuid as a search parameter.
That was what was originally requested, and that is something which
vol_id can not do unassisted (but which blkid can do, either from the
command-line or from the C library interface).
Udev can provide this functionality, if you are running on a modern
distribution that uses udev, and it does so by scanning all block
devices at hotplug/coldplug time. I'm not entirely convinced that is
the right approach if there are several hundred thousand potential
devices available via a SAN fabric, or via iSCSI --- and to be fair,
blkid probably won't be enough in that environment, either. But it
provides a nice abstraction interface so that in the future, blkid
could optionally call out to some directory service to find the
location of the iSCSI device. In contrast, the udev solution to the
find-the-device-given-a-uuid assumes that a symlink has been created,
which makes it more difficult to trap the request to look for a
particular UUID/label.
> Anyway, I don't have any objection to blkid, just trying to point out
> another solution, instead of having the original poster try to reinvent
> the wheel again :)
And I don't have an objection to udev, although I'm not convineced
it's proposed solution for finding block devices given a UUID or label
is the best one....
- Ted
prev parent reply other threads:[~2006-04-13 18:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-13 9:00 Hacking linux-utils for swap label Loiseleur Michel
2006-04-13 12:16 ` Erik Mouw
2006-04-13 12:34 ` Loiseleur Michel
2006-04-13 12:36 ` Evgeniy Dushistov
2006-04-13 13:12 ` Loiseleur Michel
2006-04-13 16:37 ` Greg KH
2006-04-13 16:52 ` Theodore Ts'o
2006-04-13 17:10 ` Greg KH
2006-04-13 18:19 ` Theodore Ts'o [this message]
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=20060413181949.GB12176@thunk.org \
--to=tytso@mit.edu \
--cc=greg@kroah.com \
--cc=linux-fsdevel@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.