0 Replies Latest reply: Oct 28, 2014 9:29 AM by Daniel McCurley RSS

    Powershell Command to Change Performance Policies on Cloned Volume

    Daniel McCurley Newbie

      Hi,

       

      I've been looking to take the burden off of my Windows 2012 serve cluster for backup snapshots.  Up to this point using Vice Versa and Windows VSS to backup data to a whitebox over 10gig.  Surprisingly effective but drains resources from a file server that is busy serving up files.  I've come up with a way to mount these NTFS iSCSI volumes on a different host using powershell but would like to set these cloned volumes to a non-cached performance policy. The reasoning is that any data that is pulled from these clones won't contribute to cache churn.  I'm hoping there is a flag I can set that will allow me to change the performance policy of a cloned volume.  Up till this point I've only seen that option on creation of new volumes in powershell.

       

      Here are the scripts I am using to Mount and Unmount cloned NTFS volumes to another host.  If you use a file based backup solution like Vice Versa this should work well.  Thanks to the code examples I'd seen on Nimble Connect for getting me most of the way there.  Thanks to Technet for the rest.

       

      How to create a clone, update iSCSI on windows server, and mount a drive with a specific letter.

       

      Connect-NSArray -SystemName 1.1.1.1 -Password ********

      Get-NSSnapShot -Volume MainDisk

      Get-NSVolume -Name MainDisk | New-NSSnapshot -Name MainDiskClone | New-NSClone -Name MainDiskClone

      Add-NSInitiatorGroupToVolume -InitiatorGroup backup-server -Volume MainDiskClone -Access Volume

      Update-IscsiTarget

      $tar = Get-IscsiTarget -NodeAddress *MainDiskClone*

      Connect-IscsiTarget -NodeAddress $tar.NodeAddress

      $disk = Get-Disk | ? OperationalStatus -EQ Offline

      set-disk -InputObject $disk -IsOffline $false

      set-disk -InputObject $disk –IsReadOnly $false

      $drivename = gwmi win32_volume -Filter "Label = 'MainDiskClone'"

      $drivename.DriveLetter = "V:"

      $drivename.put()

       

      Unmounting a clone from windows server and destroying it on the Nimble Array

       

      Connect-NSArray -SystemName 1.1.1.1 -Password ********

      $tardrop = Get-IscsiTarget -NodeAddress *MainDisk*

      Disconnect-IscsiTarget -NodeAddress $tardrop.NodeAddress -confirm:$false

      Remove-NSVolume MainDiskClone –Force

      Get-NSVolume MainDisk | Get-NSSnapShot | Remove-NSSnapShot -Force

       

      Hope this can help somebody and if anybody has any interest in revealing or adding the functionality of changing the performance policy for a cloned volume I would be very interested to hear.

       

      Thanks,

       

      Dan