Operating System - OpenVMS
1748062 Members
5724 Online
108758 Solutions
New Discussion юеВ

Re: mount all disk in the system at startup

 
SOLVED
Go to solution
Scotty HD
Frequent Advisor

mount all disk in the system at startup

when system starts i want all the disk in the system to get mounted.
where is the correct place to do this.
any better place than user login.com ?

Scotty
12 REPLIES 12
Craig A
Valued Contributor
Solution

Re: mount all disk in the system at startup

Scotty

Personally, I would have a call from SYLOGICALS.COM to a MOUNT_DISK procedure with a P1 of something like MIN

So that even when a conversational boot is performed those disks that are needed for the system to fucntion (e.g. if the SYSUAF file is off the system disk) are still accessible.

Then I would have another call in SYSTARTUP_VMS.COM with a P1 of ALL or FULL which mounts the MIN disks (if not already mounted) and then the remaining disks.

HTH

Craig
Scotty HD
Frequent Advisor

Re: mount all disk in the system at startup

#Craig A
thanks for reply

#MOUNT_DISK procedure
this is done so that all the code is in one place instead ot
embedding it in two command procedures ?

how to know which disks are there is system. should i hard code it ?
once i hard code, if that disk is not present will the code fail and cause boot
problem ?

#Then I would have another call in SYSTARTUP_VMS.COM
why another call, can this can be done in SYLOGICALS.COM itself ?

Scotty
Hoff
Honored Contributor

Re: mount all disk in the system at startup

Yes.

See the SYS$EXAMPLES:MSCPMOUNT.COM template, as one potential starting point. That's intended to run continuously in a cluster, and bring the disks back online as nodes come and go within a cluster. Probably more than you need here, but something to review regardless.
Ian Miller.
Honored Contributor

Re: mount all disk in the system at startup

Normally it is a hard coded list as the number of disks devices and their volume labels do no change very often. I would have a separate DCL procedure as already described as this gives one place to change.
____________________
Purely Personal Opinion
Scotty HD
Frequent Advisor

Re: mount all disk in the system at startup

thanks all for replies

#Ian Miller
yes. for test systems where there is lot change, i wanted a generic method.

i will read the file Hoff has mentioned.

Scotty
GuentherF
Trusted Contributor

Re: mount all disk in the system at startup

And make sure that all mount commands used during startup procedures contain a /NOASSIST.

/Guenther
John Gillings
Honored Contributor

Re: mount all disk in the system at startup

Scotty,

> i wanted a generic method.

There is no universal generic method, as there are too many possibilities for how a particular disk is mounted. Consider shadow sets, volume sets, different labels, protections etc...

You can hunt for disk devices using F$DEVICE. Here's an example:

$ HeadLoop: dsk=F$DEVICE("*","DISK")-"_"-":"
$ IF dsk.NES.""
$ THEN
$! Skip devices that are not mounted or are shadow set members
$ IF F$GETDVI(dsk,"MNT").AND.-
.NOT.F$GETDVI(dsk,"SHDW_MEMBER")
$ THEN
$ c=c+1
$ dsk'c'=dsk ! Save disk name
$ WRITE out "[DS]''dsk'Max" ! Column heading
$ ENDIF
$ GOTO HeadLoop
$ ENDIF

This is an extract from a procedure which generates disk usage in T4 format. Note that it checks if the found disk is mounted using F$GETDVI. In your case you probably want the opposite test. You then have to work out a MOUNT command, and in particular a label. One possibility is to choose a labelling scheme based on the device name. As long as all your devices are mounted the same way you're all set.

Another possibility is a table driven mechanism. You maintain a data file which describes the disks, labels, and how they're mounted. Write a procedure that reads the file, interprets the desciptions and generates appropriate MOUNT commands. This might be easier than hard coding the complete commands, and it would make it simpler to make general changes to the way disks are mounted.
A crucible of informative mistakes
Scotty HD
Frequent Advisor

Re: mount all disk in the system at startup

#Gunther Froehlin
# /NOASSIST
if mounting of the disk fails then it should not ask for
operator assistance as the boot will get stalled.
it should skip that disk and continue.
is this the purpose ?

#John Gillings
thanks for detailed response.
that helps.

Scotty
GuentherF
Trusted Contributor

Re: mount all disk in the system at startup

Correct, /NOASSIST avoids stalling the boot if there is ANY problem with mounting this disk device.

/Guenther