Re: No/bad auto-detection of fs type for small volumes (related to mixed metadata/data?)
From: cwillu <hidden>
Date: 2012-07-25 09:09:05
On Tue, Jul 24, 2012 at 6:39 PM, Marios Titas [off-list ref] wrote:
When I create a btrfs volume of size strictly less than 256 MiB then if I do
mount /dev/sdb1 /mnt/test
the kernel tries unsuccessfully to do the mount with many other file systems
before successfully trying with btrfs. For volumes of size larger than
or equal to
256 MiB it just mounts the volume without doing that. Why is this discrepancy?If I understand correctly, the kernel does not implement any fs detection; this is performed by the mount utility, which indeed may try a bunch of different filesystems until it finds one that works.
From man mount:
If no -t option is given, or if the auto type is specified,
mount will try to guess the desired type. Mount uses the blkid
or volume_id library for guessing the filesystem type; if that
does not turn up anything that looks familiar, mount will try to
read the file /etc/filesystems, or, if that does not exist,
/proc/filesystems. All of the filesystem types listed there
will be tried, except for those that are labeled "nodev" (e.g.,
devpts, proc and nfs). If /etc/filesystems ends in a line with
a single * only, mount will read /proc/filesystems afterwards.