Volume Shadowing on OpenVMS at it's very simplest can be used to provide RAID-1 mirroring using two or more locally attached hard drives. In my case I have a single hard drive (DKA300:) which acts as my system and data disk. I wanted a complete hot mirror of this drive in case of hardware failure. I have used two identical drives to do this.
If you are an OpenVMS hobbyist you will have the license required for volume shadowing. You can easily check:
$ SHOW LICENSE VOLSHAD
Active licenses on node ORAC:
------- Product ID -------- ---- Rating ----- -- Version --
Product Producer Units Avail Activ Version Release Termination
VOLSHAD DEC 0 0 100 0.0 (none) 16-OCT-2009
You then need to setup the system parameters so that when you reboot OpenVMS your current system disk is included in a shadow set to which another drive (or drives) can then be added. Edit the file SYS$SYSTEM:MODPARAMS.DAT and add the following lines:
ALLOCLASS=100
SHADOWING=2
SHADOW_SYS_DISK=1
SHADOW_SYS_UNIT=0
A sensible value for ALLOCLASS is 100, but it can be anything from 1 to 255. If you have previously added the box to a cluster this parameter may already be defined. SHADOWING must be 2 to enable shadowing. SHADOW_SYS_DISK must be 1 to enable shadowing for the system disk, and SHADOW_SYS_UNIT defines the virtual unit number which is appended to the virtual drive name DUAx:
You then need to run AUTOGEN to save these parameters. I used the following two commands:
$ @SYS$UPDATE:AUTOGEN SAVPARAMS GENPARAMS
$ @SYS$UPDATE:AUTOGEN GENPARAMS REBOOT
The second command may fail on errors, if this is the case and you are happy to proceed add the keyword FEEDBACK to the end.
This will reboot the system and (hopefully) when it's started up you should see the virtual unit when you run the SHOW DEVICE command:
$ show dev d
Device Device Error Volume Free Trans Mnt
Name Status Count Label Blocks Count Cnt
DSA0: Mounted 0 OVMSVAXSYS 16637880 337 1
$100$DKA200: (ORAC) Online wrtlck 0
$100$DKA300: (ORAC) ShadowSetMember 0 (member of DSA0:)
To add a new member to the volume set use the MOUNT command, like this:
MOUNT/CONFIRM/SYSTEM DSA0: /SHADOW=($100$DKA300,$100$DKA400) OVMSVAXSYS
This command specifies the existing system disk $100$DKA300 and the new disk $100$DKA400. You will need to confirm that you want to overwrite the contents of the new drive. The command initiates a copy of the data on the system disk to the new drive. SHOW DEVICE will indicate the copy progress:
$ show dev d
Device Device Error Volume Free Trans Mnt
Name Status Count Label Blocks Count Cnt
DSA0: Mounted 0 OVMSVAXSYS 16637880 337 1
$100$DKA200: (ORAC) Online wrtlck 0
$100$DKA300: (ORAC) ShadowSetMember 0 (member of DSA0:)
$100$DKA400: (ORAC) ShadowCopying 0 (copy trgt DSA0: 43% copied)
After the copy is complete the two shadow set members will contain identical data, so that if one of the drives should fail it can be replaced without losing any data.
I encourage you to consult the Volume Shadowing for OpenVMS manual for more information.