From: gleeve@galaxy.dnet
Newsgroups: comp.os.vms
Subject: Virtual disks clusterwide access
Date: 27 Aug 92 16:03:29 GMT
Organization: The Internet

I've experimented a bit and it appears that it is possible to make a VD:
device accessible to a cluster without MSCP serving. The trick is that
1. You modify the VD driver to set the DEV$V_CLU bit to declare itself
	cluster available, and to set ddb$l_allocls to some nonzero and
	unique allocation class.
2. You do the SYSGEN CONNECT VDAn: on each cluster node for this beast.
3. You use ASNVDM6 to assign the SAME disk storage to the VDAn: unit
	on each node.
4. You then do MOUNT/CLUSTER on the disks.

   If some cluster nodes don't have local VDAn: units loaded, they
just won't get to them. DISM/CLUSTER may complain but it will work.
The resulting VDAn: disks are accessed via the local VDdriver (which
may be accessing disks made available via MSCP servers or whatever,
but that is another issue). This can be done instead of loading VDdriver
on one node and MSCP serving it to the rest.

   While for VDdriver this may seem interesting but largely irrelevant,
it is of greater use with other virtual disks like VQdriver (which does
software based shadowing) since the work can be distributed. It also
means that failure of one node no longer disables access to the VD: unit.
   It is probably desirable to rename the driver by replacing the
string "VDDRIVER" with "DCDRIVER" or "DFDRIVER" or "DPDRIVER" or
some other name that is unique when doing this, so that local VD
units can be arranged. When you use MOUNT/CLUSTER, the host disks
MUST all be the same storage if using this technique. The actual
allocation class choice is arbitrary but should be something no other
devices are using to avoid confusion. It's just a longword, though I've
only used smallish numbers that fit in a byte (193 worked fine!).
   This has had limited testing so far, but seems to work very
cleanly. Clearly it makes it easier to handle various flavors
of disk access.
Glenn Everhart
Everhart@Raxco.com


  The following is a set of differences between the cluster
VDdriver and the older "noncluster" one that gets MSCP served.
Note that the allocation class used is just declared a global
and defined in the link command, so you can pick what you like
for the class without grief. The diffs were slightly edited to
make it easier to find where to put the dpt_store.
************
File DKB0:[EVERHART.TMP]VDDRIVERCLU.MAR;3
    2   	.IDENT	'V4gCLU'
    3   ; This is an attempt kludge that needs an .opty file to link
    4   ; that contains something like
    5   ;   SYMBOL=VDALCLS,181
    6   ; to give the VD: units a nonzero allocation class. If there is a
    7   ; VD: unit on all cluster nodes pointing at the SAME container file,
    8   ; it may mean it will be treated as one cluster disk. The dev$m_clu
    9   ; flag is set in ucb devchar2 longword so this MIGHT work. If it does
   10   ; not work the driver is still a usable virtual disk driver.
   11   ;
******
File DKB0:[EVERHART.TMP]VDDRIVER.MAR;2
    2   	.IDENT	'V4g'
    3   ;
************
************
File DKB0:[EVERHART.TMP]VDDRIVERCLU.MAR;3
  221     	DPT_STORE DDB,DDB$L_ACPD+3,B,DDB$K_PACK	;ACP CLASS
  222   	.GLOBL	VDALCLS
  223   	DPT_STORE DDB,DDB$L_ALLOCLS,L,VDALCLS	;SET ALLOCATION CLASS
  224   	.IF	NDF,VMS$V5
******
File DKB0:[EVERHART.TMP]VDDRIVER.MAR;2
  213   	DPT_STORE DDB,DDB$L_ACPD+3,B,DDB$K_PACK	;ACP CLASS
  214   	.IF	NDF,VMS$V5
************
************
File DKB0:[EVERHART.TMP]VDDRIVERCLU.MAR;3
  239   		<DEV$M_NNM-		; Prefix name with "node$" (like rp06)
  240   		!DEV$M_CLU>		; Declare device cluster available
  241   	DPT_STORE UCB,UCB$B_DEVCLASS,B,DC$_DISK  ;DEVICE CLASS
******
File DKB0:[EVERHART.TMP]VDDRIVER.MAR;2
  229   		<DEV$M_NNM>		; Prefix name with "node$" (like rp06)
  230   	DPT_STORE UCB,UCB$B_DEVCLASS,B,DC$_DISK  ;DEVICE CLASS
************

Number of difference sections found: 3
Number of difference records found: 13

DIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=DKB0:[EVERHART]CLST.DIF;1-
    DKB0:[EVERHART.TMP]VDDRIVERCLU.MAR;3-
    DKB0:[EVERHART.TMP]VDDRIVER.MAR;2