Microsoft Virtualization Discussions

manual v. powershell flexclones

darobbins
5,540 Views

Getting an issue where flexclones, based on a snapshot, that are manually created are functioning properly however when I use the Powershell modules, it creates the flexclone, brings LUNs online, and maps LUNs to igroup, but system is unable to read LUNs.  Any suggestions?

5 REPLIES 5

erick_moore
5,540 Views

POSH code?  What is the error you get when you try to read the LUN from the OS?  I assume this is Windows?

darobbins
5,540 Views

Thank you for responding.

Here is my 'sanitized' code:

connect-nacontroller CONTROLLER

$arrSnapList = @()

$colsnapshots = get-nasnapshot -name VOLUME

foreach ($objsnapshot in $colsnapshots) {$arrSnapList += $objsnapshot.name}

$snapid = $arrSnapList[0].split(".")
#write-host $snapid[1]

$strParentSnapshot = "CONTROLLER(1234567890)_VOLUME." + $snapid[1]
#write-host $strParentSnapshot

New-NAVolClone -ParentVolume VOLUME -CloneVolume clone_VOLUME -SpaceReserve none -ParentSnapshot $strParentSnapshot

Add-NALUNMap -Path /vol/clone_VOLUME/LUN -InitiatorGroup IGROUP -ID 13 | Set-NALun -Online
Add-NALUNMap -Path /vol/clone_VOLUME/LUN -InitiatorGroup IGROUP -ID 14 | Set-NALun -Online
Add-NALUNMap -Path /vol/clone_VOLUME/LUN -InitiatorGroup IGROUP -ID 15 | Set-NALun -Online   
Add-NALUNMap -Path /vol/clone_VOLUME/LUN -InitiatorGroup IGROUP -ID 16 | Set-NALun -Online

It does actually create the flexclone, maps, and onlines the LUNs.  The LUNs are just not 'readable', and no unfortunately this happens to be a Sybase raw device running on AIX.

erick_moore
5,540 Views

Thanks for the code!  Well, you lost me at the AIX part :-).  I am not sure what has to happen on an AIX system once you present new LUNs.  I assume you do some sort of SCSI bus scan so the system knows about the new devices?  Assuming that is the case when you try to mount the LUN what happens?

darobbins
5,540 Views

We tested it against a different database, using the same script but changing names, and all is well.  Although I was not getting any errors last night, I am going to re-visit after hours and try to determine if it did not apply the correct snapshot or if there is anything else I may have missed.  Thanks again.

darobbins
5,540 Views

Well its in working for 'bout a week, thanks for at least using a synapse on it, hopefully I don't have issues with snapshots in general...

Public