abair@turbinia.oakhill.uucp (Alan Bair) (01/10/90)
Back in December Eric Wassenaar had asked about mounting 2nd disk drives under BSD with mount instead of mtvol. Peter Craine replied with information about building special files and how to calculate the minor device numbers. Peter also said: "I've written a program to do all these calculations and to give you the appropriate commands. I'll be posting it soon." Did I miss the posting or has Peter been busy? Well we have installed 2 700MB disks on our DN10000, which I formated as a single stripped volume. I went through the described procedure for calculating/building the /dev entries, but mount seems to ignore them. The mtvol command works, but I would like to put all the mount stuff, 4.2 & nfs filesystems, in one file. Also, do I need to run salvol inorder for the mount to work? If I can't get mount to work, what is the proper procedure to follow with Aegis commands? The OS seems to handle the boot drive by itself, so there is no example to edit and add other disks. -- Alan Bair SPS CAD Logic Simulation & Test Motorola, Inc. Austin, Texas ...!cs.utexas.edu!oakhill!turbinia!abair
dbfunk@ICAEN.UIOWA.EDU (David B Funk) (01/13/90)
In posting <ABAIR.90Jan9174808@turbinia.oakhill.uucp> Alan Blair writes: > Well we have installed 2 700MB disks on our DN10000, which I formated > as a single stripped volume. I went through the described procedure > for calculating/building the /dev entries, but mount seems to > ignore them. The mtvol command works, but I would like to put > all the mount stuff, 4.2 & nfs filesystems, in one file. > > Also, do I need to run salvol inorder for the mount to work? > > If I can't get mount to work, what is the proper procedure to follow > with Aegis commands? The OS seems to handle the boot drive by > itself, so there is no example to edit and add other disks. You must run "salvol" before mounting any volume that wasn't properly dismounted. The sysboot will initiate a salvage of the root volume at boot time if needed. Any additional volumes must be explicitly salvaged by a user or script, if needed, before they can be mounted. I don't know about using the Unix "mount" but I do know how to get Aegis "mtvol" to work from a startup file. Here is an Aegis shell script that I wrote back at sr9.0 to mount volumes on our dsp80s. Back then I ran it from "startup.spm", now on our dsp3500s I run it from "rc.user". I have it in a file called "mount_vol" and put it in /sys/node_data. ########################################################### #!/com/sh # MOUNT_VOL # # Aegis shell script to mount logical vol #^1 ^2 # on disk at start-up time. # called by STARTUP.19L for DN300's and DN550's # or called by STARTUP.SPM for DSP's # # this script assumes that the logical volume name has already been # cataloged in the directory name space by a previous mount volume command # # arguments: # ^1 = name of physical device and unit number (eg. w0 s0) # ^2 = logical volume number # # use with a CPS: cps /com/sh -c '/sys/node_data/mount_vol w0 2' # eon if (mtvol ^1 ^2 -nq ) # try to mount it then #mount was ok else #salvage volume and try again #note that the following lines must start in column 1 salvol <<! ^1 ^2 n ! if (mtvol ^1 ^2 -nq ) then #second try succeeded else args "mount of logical volume ^1 ^2 failed" endif endif ########################################################### Then I put a line in the "rc.user" file that looks like: ( /com/sh -c /sys/node_data/mount_vol w0:1 1 > /dev/console ) & Put one of these in for each logical volume that you need to mount at boot time. This script could be run from "rc.user" or "rc" it doesn't care about "root" rights. Note that this script spits out a message to /dev/console. This is OK for a server (no display screen) but you might not want to see the messages on a display based node. You could redirect it to /dev/null or a log file if you don't want to mess up the display. Note the usage of "&" to put the mount in the background. If the volume needs salvaging, it may be quite some time before it is actually mounted (a few to several minutes depending upon the volume size). If you have other utilties that depend upon the volume being mounted before they are started, then you could put the mount invocation before them and remove the "&". Be forwarned, if you do this, it will stop "init" until the volumes are finally mounted. Dave Funk
krowitz%richter@UMIX.CC.UMICH.EDU (David Krowitz) (01/16/90)
With SR10 salvaging and mounting disks get much easier. There is a new "-n" option to salvol which checks if the disk needs to be salvaged before it starts. The user's shell script no longer needs to check if the disk fails to mount in order to test if savol must be run. You simple run salvol with the "-n" option and then run mtvol. -- David Krowitz krowitz@richter.mit.edu (18.83.0.109) krowitz%richter.mit.edu@eddie.mit.edu krowitz%richter.mit.edu@mitvma.bitnet (in order of decreasing preference)