From: Andries Brouwer <aebr@win.tue.nl>
To: Pankaj Agarwal <pankaj@pnpexports.com>,
Andreas Schwab <schwab@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: how to identify filesystem type
Date: Fri, 20 Aug 2004 23:58:58 +0200 [thread overview]
Message-ID: <20040820215858.GA5771@pclin040.win.tue.nl> (raw)
In-Reply-To: <20040820204656.GW8967@schnapps.adilger.int>
On Fri, Aug 20, 2004 at 02:46:56PM -0600, Andreas Dilger wrote:
> There is a tool available as part of e2fsprogs (1.34 maybe?) which is
> called "blkid" that identifies block devices. Currently fsck uses this
> to know what fsck.fstype to use, and it was my hope to have mount(8)
> use this also (never got around to doing that work).
>
> The benefits of blkid are that you can use it as a regular user, even
> without read access to the disk (it will return cached values generated
> by root if you don't have read access to the block device), it also will
> print LABEL and UUID information to identify the filesystem, if you use
> it repeatedly from some application it doesn't re-scan all of the devices
> each time (important for large numbers of block devices).
I suppose this code started as part of mount(8). For example,
# mount --guess-fstype /dev/hdb2
reiserfs
However, I cannot stress often enough that these are unreliable guesses.
It is really undesirable when standard infrastructure starts depending
on 99.7% guesses.
Consequently, "blkid" is a really bad name. It gives no indication
of the guessed nature of its results.
(I see that my current version is also broken:
# blkid -v
blkid 1.0.0 (12-Feb-2003)
# blkid
...
/dev/sda4: LABEL="ZIP-100" UUID="34D8-1C07" TYPE="msdos"
/dev/sda1: UUID="1ac5969c-8fdf-4f69-934a-c6103d93c05d" TYPE="ext2"
/dev/sdb4: LABEL="ZIP-100" UUID="34D8-1C07" TYPE="msdos"
/dev/sdb1: LABEL="CF_CARD032M" UUID="2001-1207" TYPE="msdos"
...
Here no /dev/sda1 and no /dev/sdb4 exist.)
Andries
next prev parent reply other threads:[~2004-08-20 21:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-19 9:07 Pankaj Agarwal
2004-08-19 9:46 ` Andreas Schwab
2004-08-19 14:03 ` Pankaj Agarwal
2004-08-20 15:36 ` Frank Steiner
2004-08-20 20:46 ` Andreas Dilger
2004-08-20 21:58 ` Andries Brouwer [this message]
2004-08-21 3:25 ` Theodore Ts'o
2004-08-21 8:51 ` Andries Brouwer
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=20040820215858.GA5771@pclin040.win.tue.nl \
--to=aebr@win.tue.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj@pnpexports.com \
--cc=schwab@suse.de \
/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
all inboxes | Powered by JetHome®