Subject: Re: Drive Numbering...
To: None <>
From: Peter Galbavy <>
List: current-users
Date: 11/17/1995 21:11:16
> /*
>  * How about looking at it from the other direction?  Run a tool from
>  * rc||rc.local||* (before 'mount -a', of course) that reads the
>  * superblock from every FFS partition on the system, examines the last
>  * mount point for each of them, and regenerates /etc/fstab
>  * appropriately.
>  * 
>  * I can hear you all now: "Ick!" :-)
> Well, okay, Mike, I won't disappoint you. :-)
> Ick!
> That sounds slick, but what if you've just finished an installation and
> the partition of /usr was last mounted on /a/usr, /usr/src was last
> mounted on /a/usr/src, /var was last mounted on /a/var, &c.?
> Besides, I don't want something automagically regenerating my fstab for
> me from the rc scripts.  It's bound to eventually be too smart for its
> own good.  I could just see it now wiping out all my mfs/nfs/*fs mounts!

Agreed with both of you. Why not do something else. Check the last mounted
directory, and if it is different to where things are now, then bomb out,
as if "fsck -p" had failed, and let the user deal with it. This, of course,
should be optional, since some people hate machines not rebooting cleanly
by themselves. But would you want it to boot cleanly if one of the drives
had gone ?

Maybe this:

# mount /dev/sd4g /disk12
/dev/sd4g last mounted on /disk11
Remount on disk12 ? Are you sure ? y

Or use the -f flag otherwise...
# mount -f /dev/sd4g /disk12

etc etc.

One area that would be fun is installation. Maybe a flag to "umount" that
say where the disk *will* be mounted next:

# umount -r /usr /a/usr
/dev/sdXX will be valid as /usr next mount

Now whatI realy want is what SunOS ODS doesn't do, but I am told that AIX
and IRIX do, which is to uniquely label components of a ccd so that they
can be "accidentally" renumbered (read: moved onto another SCSI bus) and
don't get errored or, worse, trashed.

Peter Galbavy                                 
@ Home                                                 phone://44/973/499465
in Wonderland