Wednesday, February 11, 2009

Fwd: fun with VMS when you dont know the volume name...

Thanks to Alan Frisbie!!!

this solved a couple of recovery issues for me!

R. D. Davis wrote:

> I How do
> I find out what the right volume name of this device is in order to
> mount it, or how else can I mount this disk?

I have a simple procedure for doing this. CAUTION!!! This is
not a good idea to do in most cases. I use it primarily when
mounting CDROMs when there is no danger of someone writing to
the wrong disk.

$! S y s M o u n t . C o m
$! Command procedure to mount a disk system-wide without
$! knowing its volume label.
$! P1 = Disk device name (e.g. DKA400:)
$ Old_Privs = F$SetPrv("SYSNAM,SYSPRV") ! Make sure we can Mou/Sys
$ Mount /NoAssist /Foreign 'P1 ! Let system find volname
$ Label = F$GetDVI("''P1'", "VOLNAM") ! Get volume name
$ Dismount /NoUnload 'P1 ! Dismount disk, but keep it spinning
$ Mount /NoAssist /System 'P1 'Label ! Remount it /System
$ X = F$SetPrv(Old_Privs) ! Restore original privileges
$ Exit

Even he, to whom most things that most people would think were pretty smart were pretty dumb, thought it was pretty smart.
 - Douglas Adams

No comments: