lkml.org 
[lkml]   [2004]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: how to identify filesystem type
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

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

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.755 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site