From: MERC::"uunet!ARISIA.dnet.ge.com!CRDGW2::CRDGW2::MRGATE::SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX" 13-APR-1992 00:52:59.63 To: galaxy::GleEve CC: Subj: Re: Backup problem with TTI 8mm tape drive From: RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP@CRDGW2 To: Everhart@Arisia@MRGATE Received: by crdgw1.ge.com (5.57/GE 1.137) id AA10617; Sun, 12 Apr 92 22:31:04 EDT Received: From ucbvax.Berkeley.EDU ([128.32.133.1]) by CRVAX.SRI.COM with TCP; Sun, 12 APR 92 11:18:03 PDT Received: by ucbvax.Berkeley.EDU (5.63/1.43) id AA11011; Sat, 11 Apr 92 08:05:28 -0700 Received: from USENET by ucbvax.Berkeley.EDU with netnews for info-vax@kl.sri.com (info-vax@kl.sri.com) (contact usenet@ucbvax.Berkeley.EDU if you have questions) Date: 9 Apr 92 11:34:24 GMT From: micro-heart-of-gold.mit.edu!wupost!cs.utexas.edu!ut-emx!slcs.slb.com!BRYDON%linus.slcs.slb.com@bloom-beacon.mit.edu (Harvey Brydon Organization: Schlumberger/Anadrill Sugar Land, TX Subject: Re: Backup problem with TTI 8mm tape drive Message-Id: <1992Apr9.113424.21260@slcs.slb.com> References: <5266@npri6.npri.com> Sender: info-vax-request@kl.sri.com To: info-vax@kl.sri.com In article <5266@npri6.npri.com>, richard@npri6.npri.com (Richard Head) writes: >For the past 3 years, we have experienced the following problem with >our 8mm tape: > [...] >For this reason, I have always included a number of disk checks to verify >the status of the disk before backing it up, such as: > >$ disk_mounted = f$getdvi(currentDisk,"mnt") >$ disk_foreign = f$getdvi(currentDisk,"for") >$ disk_marked = f$getdvi(currentDisk,"dmt") >$ disk_exists = f$getdvi(currentDisk,"exists") >$ disk_avail = f$getdvi(currentDisk,"host_avail") > >Does anyone know a lexical to check for MountVerifyTimeout? ;-) I got some DCL from a DEC source somewhere (forget where) that documented the bits in the longword returned from f$getdvi("diskname","sts"). You are interested most in the two %X4800 bits. Here is a piece of code that I use that does what I think you want to do. I use it on clustered as well as standalone systems. If you want to simplify it, seems to me the DEC code just looks at the %X4800 bits instead of all the possibilities I consider. $CHECK_DISK_MOUNTED: $ exists = f$getdvi("disk:","exists") $ if .not. exists then goto no_exists $ dev = f$getdvi("disk:","fulldevnam") $ sts = f$getdvi(dev,"sts") $ $ if sts .eq. %x00021810 then goto mounted_okay $ if sts .eq. %x00021913 then goto mounted_okay ! Applicon disks $ if sts .eq. %x00025810 then goto mounted_dismounted ! host unavailable/mounted $ if sts .eq. %x00061810 then goto mounted_dismounted ! mount verification (?) $ if sts .eq. %x00065010 then goto mounted_dismounted ! Applicon disk not avail $ if sts .eq. %x00065810 then goto mounted_dismounted ! Host died ungracefully $ if sts .eq. %x00021010 then goto mounted_dismounted $ if sts .eq. %x0002D810 then goto mounted_dismounted ! 'wrong volume mounted' bug $ if sts .eq. %x0000A268 then goto mounted_dismounted ! Host gone bye-bye $ if sts .eq. %x00000010 then goto not_mounted $ show sym sts $ show dev /mounted $ show dev /ful 'dev' $! $! STS Bit %X00000800 is VALID bit - check if disk not valid $! STS Bit %X00004000 is MNTVERIP bit - check if disk not in mount verification $! Not Valid implies that mount verification has timed out $! $ if (( sts .and. %x4800 ) .eq. 0 ) then goto mounted_dismounted $ status = %x1072090C ! (No such device available) $ mail nl: ASL::brydon - /person="''f$envir(""procedure"")'" - /subj="Unknown ''dev' status code: ''sts'" $ goto badexit $mounted_dismounted: $ say "Disk ''dev' is in MOUNT/DISMOUNT state, attempting to dismount and remount" $ wlog "Disk ''dev' is in MOUNT/DISMOUNT state, attempting to dismount and remount" $ set proc/priv=(SYSNAM) $ if f$getdvi("''dev'","transcnt") .le. 1 then dismount /abort 'dev' $ wait 0:01:00 $ if f$getdvi("''dev'","sts") .eq. %x00000010 then goto not_mounted $ sts = f$getdvi("''dev'","sts") $ exists = f$getdvi("''dev'","exists") $ if .not. exists then goto not_mounted $ say "Unable to mount ''dev'" $ wlog "Unable to mount ''dev'" $ status = %x1072090C ! (No such device available) $ goto badexit $not_mounted: $ say "Disk ''dev' is dismounted" $ l = f$locate("$",dev) - 1 $ host = f$extra(1,l,dev) $ set proc/priv=(cmkrnl,bypass) $ submit /noprint /log=sys$common:[sysmgr.log] /norestart /notify - /user=system sys$manager:mountdisk /que='host'_batch /prio=200 $ set proc /priv=nocmkrnl $ if f$getdvi("''dev'","sts") .ne. %x00021810 then wait 0:00:30 $ if f$getdvi("''dev'","sts") .ne. %x00021810 then wait 0:00:30 $ if f$getdvi("''dev'","sts") .ne. %x00021810 then wait 0:00:30 $ if f$getdvi("''dev'","sts") .ne. %x00021810 then wait 0:00:30 $ if f$getdvi("''dev'","sts") .eq. %x00021810 then goto mounted_okay $ say "Device ''dev' is still not mounted" $ wlog "Attempt to remount ''dev' has been unsuccessful" $ status = %x1072090C ! (No such device available) $ goto badexit >Also, has anyone experienced this problem with their 8mm drives? The drive >we have is a TTI (Transitional Technology) CTS-8, on a MicroVAX 3400 with >their Q-bus I/F. VMS 5.4-2. This problem has occurred through replacement >of several of the 8mm tape drives, and occurred with both the MX driver >version, and also the MSCP version, which we use now. I have seen and heard of lots of people having problems with 8mm drives connected via DEC's SCSI interface, using MKDRIVER. I use mine with either a Qbus or Unibus SCSI controller, using MUDRIVER (? - whatever it is for the TU81/TK50/TK70). The problems seem to be related to MKDRIVER, which DEC is supposedly fixing in a 'future release'. If you are using a CMD controller in Qbus, there is a PROM upgrade that you need to apply if you are using it in a VAX 4000. HTH ____________________________________________________________________________ Harvey Brydon | Internet: brydon@asl.sinet.slb.com Schlumberger Anadrill | FAX: (713)274-8399 200 Macco Blvd | Telex: 1565030001 SINET ASL SLB Sugar Land, TX 77478 | P.O.T.S.: (713)274-8000 x8281 or 274-8281 (d.i.d.) Backup my system disk? Okay, where's the reverse switch?