Operating System - OpenVMS
1748195 Members
3513 Online
108759 Solutions
New Discussion юеВ

dismounting a shadow set with installed images

 
SOLVED
Go to solution
Kevin Carter_3
Frequent Advisor

dismounting a shadow set with installed images

A DS20 is running OpenVMS 8.2, there are 3 two volume shadow sets. One of the shadow sets is an ODS-5 volume, DSA30. DSA30 has WEBES, Oracle intelligent agent and an Oracle home on it. Oracle and its agent both "install" images. To dismount DSA30 its necessary to kill the processes that comprise WEBES, do an orderly shutdown of Oracle, the listener, beqlsnr, execute a "remoracle" command to uninstall the Oracle images; shutdown the agent, and do a "remoracle" command to uninstall the agent images. This process is error prone and often does not complete, which makes a rebuild of the volume necessary.

I am wondering if there is an easier / simpler way to dismount a volume shadow set (with installed images) to avoid rebuilding the volume after a reboot?

Thanks in advance

Kevin
4 REPLIES 4
Hoff
Honored Contributor
Solution

Re: dismounting a shadow set with installed images

If there's stuff active, you need to shut down the pieces cleanly, or stop the pieces, before the shutdown.

The OpenVMS SHUTDOWN doesn't have good staging here, and modifying the contents of the site-local SYSHUTDWN.COM procedure is the central choice.

For more complex requirements, I've tended to create a wrapper around the shutdown that does what is needed, or (unsupported) insert a site-local hook directly into the SHUTDOWN.COM procedure.

If you need get in ahead of the usual SYSHUTDWN.COM in the sequence, some of the "sneaky" (documented) approaches involve trapping the DECnet network shutdown in an application, or using the logical name SHUTDOWN$MINIMUM_MINUTES and then polling for and trapping the SHUTDOWN$TIME logical name or such.
John Gillings
Honored Contributor

Re: dismounting a shadow set with installed images

Kevin,

Sorry, no short cuts. To dismount the volume, you need to close everything.

Does the rebuild interfere with anything? I'd expect it to be quite fast, since the open files were read only. If you're like most VMS shops your reboot interval should be measured in months, if not years, so is it really a huge issue?

If it causes enough trouble to be bothered with, check out the images involved. If they're small enough, you may be able to move the images onto a RAM drive and install them from there, leaving the shadow set clean, and possibly getting a small performance boost for a small investment in memory.

You would need to hijack the startup procedures for WEBES and Oracle to create the RAM drive, copy images and define logical names.

You don't actually "fix" anything. You're still dismounting a volume with open files, but it's a RAM drive, soon to be vaporised, so it doesn't matter.
A crucible of informative mistakes
Jim_McKinney
Honored Contributor

Re: dismounting a shadow set with installed images

Don't have Oracle and know nothing about it - do have WEBES. Following, extracted from SYSHUTDWN.COM, is how I handle WEBES and the generic case of removing installed images and dismounting disks during shutdown. I imagine you could just insert an Oracle shutdown after the WEBES shutdown?

$! SYSHUTDWN.COM
$ set noon
$!
$!
$ set process/privilege=all ! some software doesn't enable authorized privs
.
.
.
$! ** Start WEBES Shutdown - DESTA Director and WCCPROXY
$! ** +
$ if f$search("sys$startup:desta$shutdown.com") .nes. "" then -
@sys$startup:desta$shutdown
$ wccproxy stop
$! ** -
$! ** End of WEBES shutdown
.
.
.
$! ** Start disk dismounting
$! ** +
$! dismount any disks that are possible
$diskloop:
$ disk = f$device(,"disk")
$ if disk .eqs. "" then goto disksdone
$ if disk .eqs. f$getdvi("sys$sysdevice","fulldevnam") then goto diskloop
$ if f$getdvi(disk,"shdw_member") then goto diskloop
$ if .not f$getdvi(disk,"mnt") then goto diskloop
$ if f$getdvi(disk,"transcnt") .gt. 1 then call deinstall "''disk'"
$ if f$getdvi(disk,"transcnt") .eq. 1
$ then
$ write sys$output "Dismounting ''disk'"
$ dismount/nounload 'disk'
$ else
$ write sys$output -
f$fao("!_"),"*** Unable to dismount disk ",disk," - disk still active"
$ endif
$ goto diskloop
$disksdone:
$ show device d
$! ** -
$! ** End disk dismounting
$!
$ exit 1
$!
$!
$!
$deinstall: subroutine ! attempt to locate and remove any INSTALLed images
$ ! %X00000110 => %SYSTEM-W-INSFARG, insufficient call arguments
$ if p1 .eqs. "" then exit ! %X00000110
$ ! %X00000908 => %SYSTEM-W-NOSUCHDEV, no such device available
$ if .not. f$getdvi(p1,"exists")
$ then
$ write sys$output "Unable to deINSTALL images, ''p1' does not exist"
$ exit %X00000908
$ endif
$ target = f$getdvi(p1,"devnam")
$ write sys$output ""
$ write sys$output "Scanning for INSTALLed images on ''target' . . ."
$ write sys$output ""
$ tmpfil := sys$scratch:'f$unique()'.tmp
$ define/user sys$output 'tmpfil'
$ install list
$ count = 0
$ match = 0
$ open/read input 'tmpfil'
$next_image:
$ read/error=nomore_images input record
$ if f$locate(":",record) .ne. f$length(record)
$ then
$ match = 0
$ device = f$getdvi(f$element(0,":",record),"devnam")
$ if device .eqs. target
$ then
$ match = 1
$ location = f$element(0,">",record) + ">"
$ ext = f$element(1,">",record)
$ endif
$ goto next_image
$ endif
$ if .not. match then goto next_image
$ if f$locate(";",record) .eq. f$length(record) then goto next_image
$ filename = f$element(0,";",f$edit(record,"trim"))
$ filespec = location + filename + ext
$ write sys$output " deINSTALLing ''filespec' . . ."
$ install remove 'filespec'
$ count = count + 1
$ goto next_image
$nomore_images:
$ close input
$ delete 'tmpfil';0
$ write sys$output ""
$ if count .ne. 0
$ then
$ write sys$output "''count' images deINSALLed on ''target' . . ."
$ else
$ write sys$output "No INSTALLed images located on ''target' . . ."
$ endif
$ write sys$output ""
$ exit 1
$ endsubroutine
Kevin Carter_3
Frequent Advisor

Re: dismounting a shadow set with installed images

Thanks for the valuable input on this question.