Ok so this is a simple little script that replicates the vDisks from one PVS server in a farm to another. This is a great solution if the vDisks are stored on the PVS servers local disk and not for example on a DFS-R share or CIFS location.

 

The script itself has a principle of a master PVS server which all vDisk updates are created upon a single server and then replicated. The script copies any updated content from the source server to the target. The important bit though is that it also retains the timestamps of the files and excludes the writecache and *.lok files which are individual to the PVS servers and the device targets that are running on them.

 

#Firstly the script maps a drive

#Then the robocopy runs the mirror operation

NET USE F: \\%ServernamePVS02%\D

ROBOCOPY /MIR D:\VDISKSTORE\ F:\VDISKSTORE /XF *.LOK /XD D:\VDISKSTORE\WRITECACHE

 

Within the above line the /MIR d:\vdiskstore f:\vdiskstore portion tells robocopy to mirror the local vDisk store (d:\vdiskstore) to the remote PVS server, while the last bit of the script /XF *.lok and /XD d:\vdiskstore\writecache excludes any files with the lok extension and the writecache directory.

 

Its simple and works a treat along with the still fairly new vDisk update method rather than the traditional copy and update of full vDisk files. It also may resolve the no servers available for this vdisk message as described here when a maintenance mode vdisk update is created.

 

Author: Dale Scriven

 

One Response to Robocopy script to replicate Citrix PVS vdisk store

  1. Rajiv Kumar says:

    Its helpful , Thanks very much!!

Leave a Reply

Set your Twitter account name in your settings to use the TwitterBar Section.
%d bloggers like this: