Messages in this thread | | | Date | Fri, 20 Aug 2004 14:46:56 -0600 | From | Andreas Dilger <> | Subject | Re: how to identify filesystem type |
| |
On Aug 19, 2004 19:33 +0530, Pankaj Agarwal wrote: > > this is the output when you have a mounted block device.....you can only > mount when you know the filesystem ....thats wat i wanna know...hoe to > identify filesytems...on ablockdevice. > > thanks anyways, looking forward for more information on this
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).
Cheers, Andreas -- Andreas Dilger http://sourceforge.net/projects/ext2resize/ http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/
[unhandled content-type:application/pgp-signature] | |