On 2010-03-13, at 13:30, Francis Moreau wrote:
I've some shell scripts which try to find out the filesystem hosted by
a block device.
They basically do this:
mount /dev/sdc1 /mnt
fs=$(stat -f -c %T $mount_point)
umount /mnt
Mounting an in-use filesystem is a bad idea.
You should just use the blkid tool, which wa written specifically for
this purpose. It was previously part of e2fsprogs (installed on 99%
of systems) and in the future (possibly even FC12) it has moved over
to util-linux (on 100% of systems).
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html