- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: What command to use for retrieving File System
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 01:40 AM
тАО09-24-2008 01:40 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 01:49 AM
тАО09-24-2008 01:49 AM
Re: What command to use for retrieving File System
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 02:01 AM
тАО09-24-2008 02:01 AM
Re: What command to use for retrieving File System
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 02:03 AM
тАО09-24-2008 02:03 AM
Re: What command to use for retrieving File System
$ 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,...).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 02:07 AM
тАО09-24-2008 02:07 AM
Re: What command to use for retrieving File System
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 03:04 AM
тАО09-24-2008 03:04 AM
Re: What command to use for retrieving File System
f$getdvi(disk,"VOLNAM") etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 03:12 AM
тАО09-24-2008 03:12 AM
Re: What command to use for retrieving File System
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 03:14 AM
тАО09-24-2008 03:14 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 03:51 AM
тАО09-24-2008 03:51 AM
Re: What command to use for retrieving File System
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.
OpenVMS Developer & System Manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2008 05:56 AM
тАО09-24-2008 05:56 AM
Re: What command to use for retrieving File System
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.
- « Previous
-
- 1
- 2
- Next »