Re: SCSI device numbering

loewis@informatik.hu-berlin.de
Thu, 4 Jul 1996 22:51:36 +0200


>2) Identifying a fs by a means other than dev_t
>Solving 2) has not really been discussed all that much. I think
>it is do-able at either the fs or file level (ie. ID tags).
>Simply put: tell mount you have block devices A B C D E F G and mount
>them so that every fs lands in the right place. This might be
>done entirely in the user space by a new 'mount'.

I've been thinking about something like this, too. For making mount as
automatic as possible, we need two things:
- determine what file system is on a special device
- determine if and where to mount it
For the first part, I see two options: A file system recognizing library,
and a mount probing option. The library would be a great thing for
installation programs: Look around what devices have what file systems,
not only based on the partition type, but by actually looking at the volume.

The same thing can be done in kernel space. Most drivers probe before
mounting, anyways, so we could have an option: Just probe
(mount -t hpfs -o probe /dev/hda7 /unused). There are several error codes
for that call: probing not supported, wrong file system, device error,
permission denied.

Once we know what file system to use, we need to know whether and where
to mount it. 'Whether' can be done in /etc/fstab
/dev/[hs][a-d][1-9] /dsk/$1 ext2,ntfs,vfat defaults 0 0
You could give a list of devices to probe and a list of file systems accepted.
Automatically finding the right place is more tricky. Some file systems
support the notion of 'last mount point' (e.g. ufs), which could be used.

Martin