HPE EVA Storage

RSM - MountHostVolume -

 
dataerror
Occasional Contributor

RSM - MountHostVolume -

Hello,

I am relatively new to RSM and have issues automatically mounting a disk/partition. I can mount it fine by knowing what the Windows disk number is ahead of time. The problem is that the disk number may not always be the same as other jobs may introduce new disks on the host.

I've tried creating a batch job that will find out for what the Windows disk number is based on the LunID. I tried storing the output of the launch command from this script into a variable, but this doesn't work as the variable ends up containing more than the standard output.

Please help me find out what I'm missing. Many thanks in advance.

Here's the RSM script I am using:

// Replicate raw storage volume(s), and mount to a host.
//
// Assign some variables that will be used in this job.
$source_storvol_unc1 = SetVariable ( "\\eva4400\server2\Disk" )
$dest_storvol1 = SetVariable ( "snapshot_1" )
$mount_host = SetVariable ( "server1" )
//
// Validate that resources are as expected.
ValidateHost ( $mount_host )
ValidateStorageVolume ( $source_storvol_unc1 )
ValidateSnapshotStorageVolume ( $source_storvol_unc1 )
//
$Rep1 = SnapshotStorageVolume ( $source_storvol_unc1, DEMAND_ALLOCATED, SAME, $dest_storvol1, WAIT ) onerror pauseat E1:
//
// Create disk device(s) on a host.
CreateDiskDevice ( $Rep1, $mount_host, 11, READ_ONLY, HOST_FC_PORT ) onerror pauseat E2:
//
// Mount
// THIS IS WHERE THE LUN MAY NOT BE DISK2P1 ON THE HOST BUT DISK 4 or 5, etc.
MountHostVolume ( "\\server1\Disk2P1", "F:" )
//DO STUFF
UnmountHostVolume ( "\\server1\f:\" )
// Rollback.
E3: RemoveDiskDevice ( $Rep1, $mount_host, HOST_FC_PORT ) onerror pauseat E3:
//
E2: DeleteStorageVolume ( $Rep1 ) onerror pauseat E2:
//
Exit ( SUCCESS )
//
// Failure exit - no rollback needed.
E1: Exit ( FAILURE )