Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

What command to use for retrieving File System

 
Alok_Kumar
Occasional Advisor

What command to use for retrieving File System

If OpenVMS box is a cluster node and I give command as 'SHOW DEVICE /MOUNTED', it also gives VOLUME LABEL of anouther node with SUFFIX as : .
What does that mean. How can I retrieve information of only Filesystem on Node1.

Thanks for your help
19 REPLIES 19
Willem Grooters
Honored Contributor

Re: What command to use for retrieving File System

A VMS cluster is ONE management unit. So any disk mounted in the cluster will show up on all nodes. Therefore, you'll see these NODE2 disks on NODE1. To show on which node the disk is mounted, you'll have this suffix.

To get JUST THE node1 DISKS, YOU CAN USE:

$ SHOW DEV D /SEARCH=NODE1/PAGE

(/PAGE is required with /SEARCH, at least on VMS 7.2)
Willem Grooters
OpenVMS Developer & System Manager
Steven Schweda
Honored Contributor

Re: What command to use for retrieving File System

> [...] So any disk mounted in the cluster
> will show up on all nodes. [...]

Well, any disk which is served to the cluster
will "show up on all nodes", but it will be
mounted cluster-wide only if the MOUNT
command included /CLUSTER.

If you really want someone to interpret your
SHOW DEVICE report for you, you might
consider exhibiting it. The real thing
almost always beats a description.
Alok_Kumar
Occasional Advisor

Re: What command to use for retrieving File System

This command providedalso gives info along with the Cluster 2 env file system details. Can by anyway we fire DCL command to just see Node 1 File system?

Willem Grooters
Honored Contributor

Re: What command to use for retrieving File System

Sorry - no cluster at hand so it did't come up correctlt to answer your question properly.

If a disk is mounted in the cluster, it will be available on all systems so there is no real distiction between the nodes - a VMS cluster is ONE management unit and (except explicitly specified otherwise) ALL devices are shared between the nodes.

It might be that adding the parentheses
in tyhe search argument may do the trick:

$ PIPE SHO DEV D/SEARCH="(node1)" /PAGE

otherwise, you'll have to process the output and retrieve only those lines that haev the nodename in parentheses directly following the device. But again: no cluster at hand so just an idea.
Willem Grooters
OpenVMS Developer & System Manager
Alok_Kumar
Occasional Advisor

Re: What command to use for retrieving File System

One difference I find to filter my requirement but need some confirmation if I am looking at right direction

When I fire SHOW DEV /FULL, for file systems which are from this node, it shows as "served to cluster via MSCP "

For Filesystem of another node it does not give description as via MSCP Server.

What does this mean. Is it correct way to check which filesystem belongs to current node.
Kumar_Sanjay
Regular Advisor

Re: What command to use for retrieving File System

you can use this also.

PIPE SHOW DEV D |SEAR SYS$INPUT NODE1

Alok_Kumar
Occasional Advisor

Re: What command to use for retrieving File System

Hi Sanjay,

I think we are closing to what I require. Here what command gives output is that it shows Filesystem of . example

$1$DKA0: (MODE2 NAME)

But for FileSystem of Node1 (actual system where I am running command), it does not give any name against FileSystem. So I need something opposite to what this commands does.
Kumar_Sanjay
Regular Advisor

Re: What command to use for retrieving File System

Alok,

I am not able to understand your objective. Could you please explain what you are trying to achieve.

Regards
Sanjay Kumar.
Alok_Kumar
Occasional Advisor

Re: What command to use for retrieving File System

Ok...The command gives output as attached file.

I want to have output with the Device with(AIN) not a part of output. Attaching Expe

I hope it will be much clear now.

Thanks Sanjay

Joseph Huber_1
Honored Contributor

Re: What command to use for retrieving File System


SHOW DEVICE D/MOUNTED/SERVED

seems to come near what You want.
But it probably will not list disks which are not served to the cluster.
http://www.mpp.mpg.de/~huber
Joseph Huber_1
Honored Contributor

Re: What command to use for retrieving File System

Sorry my error, the combination of parameters/qualifiers in my reply does not work, it must be

SHOW DEVICE /SERVED

If You want to see only locally mounted disks, then I think You have to write a command-file doing a device-scan into variable DISK, then looking for each device at
f$getdvi(DISK,"REMOTE_DEVICE") or
F$GETDVI(DISK,"DFS_ACCESS") or

to exclude them from the display.
http://www.mpp.mpg.de/~huber
Jan van den Ende
Honored Contributor

Re: What command to use for retrieving File System

Alok,

Let me begin with a

Warm welcome to the VMS forum!

Your specific question:

$ pipe show device d | search sys$input "AIN" /match=nor

will exclude any lines containing "AIN" from the output of SHOW DEVICE D

If I understood correctly, that was what you asked for.

But have a second look at the output: it has a column headed: "Mount count"

If that number is more than 1, tou are really looking at something that simply DOES NOT EXIST in any OS except VMS or Tru64: That drive is DIRECTLY adreesable from ALL nodes (physically not always entirely true, but logically it is LOCALLY mounted SIMULTANUOUS on ALL nodes.

hth.

Proost.

Have one on me.

jpe
Don't rust yours pelled jacker to fine doll missed aches.
Joseph Huber_1
Honored Contributor

Re: What command to use for retrieving File System

A procedure could be like this one:

$ ON WARNING THEN GOSUB ERROR_HANDLER
$ ON CONTROL_Y THEN GOTO EXIT_PROCEDURE
$ !
$ ! Loop through the disks
$ !
$ NEXT_DISK:
$ DISK = F$DEVICE("*","DISK")
$ IF DISK .EQS. "" THEN GOTO NO_MORE_DISKS
$ IF .NOT. F$GETDVI(DISK,"MNT") THEN GOTO NEXT_DISK ! Not mounted
$! check the disk is LOCAL/served by this node
$ IF f$getdvi(DISK,"REMOTE_DEVICE") THEN GOTO NEXT_DISK ! remote served
$ IF F$GETDVI(DISK,"DFS_ACCESS") THEN GOTO NEXT_DISK ! e.g. DNFS
$ IF F$GETDVI(DISK,"SHDW_MEMBER") THEN GOTO NEXT_DISK ! Shadow member
$ IF F$GETDVI(DISK,"VOLNUMBER") .GT. 1 THEN GOTO NEXT_DISK ! Vol. set
$ SHOW DEVICE 'DISK'
$ GOTO NEXT_DISK
$ !
$ EXIT_PROCEDURE:
$ WRITE SYS$OUTPUT "... Procedure cancelled "
$ !
$ NO_MORE_DISKS:
$ SET NOON
$ EXIT
$ !
$ ERROR_HANDLER:
$ SET NOON
$ write sys$output " error on disk ",DISK
$ RETURN
$! DCL procedure written by Joseph Huber

To have a more compact display, replace the simple "SHOW DEVICE 'disk'" command by a write statement extracted from each disk using f$getdvi(disk,...).

http://www.mpp.mpg.de/~huber
Alok_Kumar
Occasional Advisor

Re: What command to use for retrieving File System

Thanks all for such awesome inputs...

To again refrain..

I have to use DCL statemement to parse as XML statement to system and then retrieve output.

Now show device /served thus this but problem is it removes VOLUME LABEL!!!!!!! Phewwww
Joseph Huber_1
Honored Contributor

Re: What command to use for retrieving File System

If You are anyway inside a command-file, don't do a simple SHOW DEV, use
f$getdvi(disk,"VOLNAM") etc.
http://www.mpp.mpg.de/~huber
Robert Gezelter
Honored Contributor

Re: What command to use for retrieving File System

Kumar,

As Joseph has already noted, if you are in a command file already, then the F$GETDVI lexical function in DCL is the best vehicle for extracting information about a device and the volume on it.

IMHO, parsing the output of a SHOW command is a risky business. Most of the information available using SHOW DEVICE is available using the lexical function.

This is a somewhat different structure than is common in the *IX world, where using pipes is the standard solution.

- Bob Gezelter, http://www.rlgsc.com
Joseph Huber_1
Honored Contributor

Re: What command to use for retrieving File System


Maybe You are intersted in looking at my disk_space command-file
http://wwwvms.mppmu.mpg.de/disk$www/com/disk_space.com

( @disk_space "" LOCAL )

to see how to get all needed info using f$getdvi.
Then replace the screen output with formatting the XML output as needed.
http://www.mpp.mpg.de/~huber
Willem Grooters
Honored Contributor

Re: What command to use for retrieving File System

Given your output, this node has no alloclass set, or the disks are not served to the cluster. Just focussing on the attachement, and if CPQMEG is the system you're interested in:

PIPE SHO DEV D | sea sys$pipe "CPQMEG$D"

would give exactly what you expect.
Which may, or may not, be the exact representation of your environment. Further more, it will cause problems where alloclass set set, or disks are served to the cluster. The suggestion by Joseph and Rob to use F$GETDVI is far more reliable and portable over VMS systems.
Willem Grooters
OpenVMS Developer & System Manager
Hoff
Honored Contributor

Re: What command to use for retrieving File System

I'd go one further; this is almost certainly some sort of an agent given what sort of pieces your apparent employer typically provides, and I'd go to sys$getdvi[w] and sys$device_scan[w] and related system service calls for your processing.

And there are all manner of wrinkles here, as you can have any of various storage configurations; stuff that's not local, but often served from the local host. (DSSI, for instance.)

You're really headed into a murky area, and the shared-write nature of the file system and the storage-only and cluster communications interconnects can really make for a complex view of the storage environment. Yes, a DCL solution could almost certainly be implemented, but you'll be chasing corner cases if you're not very careful. I'd go with the system services here.

And for clarity: parsing DCL output is going to lead to support issues. Don't do that. It's common and often preferred on Unix, though it's not the best solution and most stable on OpenVMS.