- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Detecting devices in Mount Verify Timeout from DCL
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
Forums
Discussions
Discussions
Discussions
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
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
11-27-2007 10:05 AM
11-27-2007 10:05 AM
I'm not sure where this information is available. There doesn't seem to be an item code for F$GETDVI that will return T/F for this condition.
It would also be nice to have an item code for determining that a device has entered mount verification.
Is there a bit/field in the device dependent characteristics that has this info?
I dug around in the I/O manual some but it's not jumping out at me. Where should I be looking? I'm sure that it's in the system data structures in the volume control block. I just want to know how to get it from DCL without having to search the output of the SHOW DEVICE command.
Thanks for any feedback,
Robert
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 10:24 AM
11-27-2007 10:24 AM
SolutionUCB$V_MNTVERIP : Mount verification is in progress.
This is under DVI$_STS for which the bits are indicated to be defined in $UCBDEF.
$ pipe libr /extr=$ucbdef/out=sys$output sys$library:lib.mlb | search sys$pipe MNTVER
$EQU UCB$M_MNTVERIP <^X4000>
$EQU UCB$V_MNTVERIP 14
$ sts = f$getdvi("sys$disk","sts")
$ show symb sts
STS = 134350864 Hex = 08020810
So you can use STS.AND.%x4000 or extract bit # 14
Cheers,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 10:31 AM
11-27-2007 10:31 AM
Re: Detecting devices in Mount Verify Timeout from DCL
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 10:41 AM
11-27-2007 10:41 AM
Re: Detecting devices in Mount Verify Timeout from DCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 10:47 AM
11-27-2007 10:47 AM
Re: Detecting devices in Mount Verify Timeout from DCL
There is a $GETDVI item MOUNTVER_ELIGIBLE. If that's false there's no point in looking any further.
$GETDVI item STS returns the status longword. I think you can determine the complete MV status from bits UCB$V_MNTVERIP, UCB$V_MNTVERPND, UCB$V_TIMOUT and UCB$V_WRONGVOL (there are a few other obscure bits releated to MV which may also be of interest, see SSRM under $GETDVI for more details).
If all else fails, since SHOW DEVICE can display the state, it must be in there somewhere! Maybe get your hands on the source listings for SHOW to see how it's done?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 10:49 AM
11-27-2007 10:49 AM
Re: Detecting devices in Mount Verify Timeout from DCL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2007 04:25 PM
11-27-2007 04:25 PM
Re: Detecting devices in Mount Verify Timeout from DCL
1) device is mounted
2) device not in mount verification
3) ucb$v_valid bit is clear
Note that virtually all disks will return
TRUE for the MOUNTVER_ELIGIBLE item code.
Among the few that will return FALSE are
devices mounted /NOMOUNTVERIFY and foreign-mounted devices. Of course, an unmounted device will return FALSE, but that's not a particularly interesting case.
-- Rob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 03:40 AM
11-28-2007 03:40 AM
Re: Detecting devices in Mount Verify Timeout from DCL
This kinda throws a wrench in the discussion so far.
And what DOES this flag really stand for? Is it actually the bit that tells when MVTIMEOUT has occurred?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 04:36 AM
11-28-2007 04:36 AM
Re: Detecting devices in Mount Verify Timeout from DCL
DVI$_MOUNTVER_ELIGIBLE reflects the status of the vcb$v_mountver bit in the VCB (Volume Control Block) of a mounted disk.
from [SYS]MOUNTVER
'the MOUNTVER bit is cleared when mount verification aborts, whether due to a timeout or due to execution of a DISMOUNT /ABORT command.'
Volker.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 05:49 AM
11-28-2007 05:49 AM
Re: Detecting devices in Mount Verify Timeout from DCL
$ pipe show device 'device_name' | search sys$pipe mntverifytimeout ; -
x = f$message($status,"IDENT").nes."%NOMATCHES" ; -
define/job/nolog 'device_name'_mvtimeout &x
$ mvtest = f$trnlnm(device_name+"_mvtimeout","LNM$JOB")
I rewrote my subroutine to check for device available and ready to mount using the research everyone contributed:
$!
$! Poll: subroutine to poll to see if a particular drive comes online
$! Parameters
$! p1 device name
$! p2 label
$! p3 poll count
$! p4 symbol to return status
$! p5 extra mount qualifiers
$!
$POLL: subroutine
$ set noon
$ device = p1
$ device_name = f$element(0,":",device)
$ volume_label == f$element(1,":",device)
$ wait_interval = p2
$ if wait_interval .eqs. "" then $ wait_interval = "0:0:1.0"
$ poll_cnt = 'p3'
$ if poll_cnt .eqs."" then $ poll_cnt = 60
$ status_sym = p4
$ mount_quals = p5
$ 'status_sym' == 0
$!
$ poll_begin = f$time()
$POLL_LOOP:
$ if poll_cnt .lt. 'p3'
$ then
$ if poll_cnt .eq. 'p3'-1
$ then
$ say "***"
$ say "* Waiting for Device ",device_name," ( ",volume_label," ) "
$ say "* ",f$time()
$ say "***"
$ endif
$ endif
$ if poll_cnt.gt.0
$ then! keep trying
$ poll_cnt = poll_cnt - 1
$ IF F$GETDVI(device_name,"EXISTS")
$ THEN ! device exists
$ if .not. f$GETDVI(device_name,"MNT")
$ then
$ if .not. ( f$getdvi(device_name,"HOST_AVAIL") .or. -
f$getdvi(device_name,"ALT_HOST_AVAIL") )
$ then ! neither primary nor secondary host is available
$ wait 'wait_interval'
$ goto POLL_LOOP ! wait and retry
$ endif ! no host available
$ if volume_label .eqs. ""
$ then ! try to get the label from the drive
$ mount/override 'device_name':
$ volume_label = f$getdvi(device_name,"volnam")
$ dismount 'device_name':
$ endif ! get the label from the drive
$ if poll_cnt.lt. 'p3'-1
$ then ! show how long we waited
$ wait_time = f$delta_time(poll_begin,f$time())
$ say "***"
$ say "* Waited ",wait_time," for ",device_name," to come online."
$ say "* ",f$time()
$ say "***"
$ endif! show how long we waited
$ MOUNT/SYSTEM/NOASSIST 'device_name': 'volume_label''mount_quals'
$ else ! the device is mounted, test for mvtimeout
$
$ show device 'device_name'
$ mvtimeout = .not.f$getdvi(device_name,"MOUNTVER_ELIGIBLE")
$ if mvtimeout
$ then ! mount verification timed out -- dismount it to reset
$ say "***"
$ say "* Device ",device_name," timed out mount verification, dismounting "
$ say "***"
$ dismount/abort/override=check 'device_name'
$ goto POLL_LOOP ! retry the mount
$ endif! mount verification timed out
$!
$ endif
$ 'status_sym' == $status
$ ELSE ! device doesn't exist yet -- wait for it to show up
$ WAIT 'wait_interval'
$ GOTO POLL_LOOP
$ ENDIF
$ else ! give up -- the device never became available -- move on to the next one
$ say "***"
$ say "* Device ",device_name," ( ",volume_label," ) is not available -- continuing "
$ say "* ",f$time()
$ say "***"
$ endif! keep trying/give up
$!
$POLL_END:
$endsubroutine
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 07:15 AM
11-28-2007 07:15 AM
Re: Detecting devices in Mount Verify Timeout from DCL
$! $ pipe lib/extr=$ucbdef/out=sys$output: sys$share:lib.mlb | -
$! _$ sear sys$pipe m_valid,m_mnt
$! $EQU UCB$M_VALID <^X800>
$! $EQU UCB$M_MNTVERIP <^X4000>
$! $ pipe lib/extr=$devdef/out=sys$output: sys$share:starlet.mlb | -
$! _$ sear sys$pipe m_mnt
$! $EQU DEV$M_MNT <^X80000>
$
$ devchar = f$getdvi(p1,"devchar")
$ sts = f$getdvi(p1,"sts")
$ mounted = ((devchar .and. %x80000) .ne. 0)
$ valid = ((sts .and. %x800) .ne. 0)
$ mntvfy_in_progress = ((sts .and. %x4000) .ne. 0)
$ if mounted .and. (.not. mntvfy_in_progress) .and. (.not. valid) then -
write sys$output "Disk ''p1' status is MntVerifyTimeout"
$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2007 08:02 AM
11-28-2007 08:02 AM
Re: Detecting devices in Mount Verify Timeout from DCL
$ search sys$share:*.req ucb$m_valid,ucb$m_mnt,dev$m_mnt
A slightly more complete version of the same code:
$! $ pipe lib/extr=$ucbdef/out=sys$output: sys$share:lib.mlb | -
$! _$ sear sys$pipe m_valid,m_mnt
$! $EQU UCB$M_VALID <^X800>
$! $EQU UCB$M_MNTVERIP <^X4000>
$! $ pipe lib/extr=$devdef/out=sys$output: sys$share:starlet.mlb | -
$! _$ sear sys$pipe m_mnt
$! $EQU DEV$M_MNT <^X80000>
$!
$ devchar = f$getdvi(p1,"devchar")
$ sts = f$getdvi(p1,"sts")
$ mounted = ((devchar .and. %x80000) .ne. 0)
$ valid = ((sts .and. %x800) .ne. 0)
$ mvtimeout = .not.f$getdvi(p1,"MOUNTVER_ELIGIBLE")
$ mntvfy_in_progress = ((sts .and. %x4000) .ne. 0)
$ show symbol/local/all
$ if mounted .and. mntvfy_in_progress then -
write sys$Output "Disk ",p1," status is MntVerifyInProgress"
$!
$ if mounted .and. (.not. mntvfy_in_progress) .and. (.not. valid) .and. (mvtimeout) then -
write sys$output "Disk ''p1' status is MntVerifyTimeout"
$!