Thursday, November 19, 2009

Disk ID issues with disk cloning on Windows Clustering

In windows clustering Disk ID is used to determine disk uniqueness. If you are using a SAN or other utilities that clone a disk and try to add another disk that is already clustered storage your disk will come online as reserved. Cluster storage takes control of this disk assuming that its meant to be the same disk. This would and can be great if you need to restore a cluster disk that failed and have a disk clone of that disk. When it would get restored the cluster would match on the disk id which would allow the clustered application or other clustered services to work without reconfiguration. Where this can effect you if for example you have a SAN that supports disk cloning which would indeed copy the disk id. That disk was a sysprep based windows LUN and when attached to a cluster node will become reserved. To prevent this from happening you can change the disk id from within diskpart. Best way I found is attach your LUN to a non cluster member that way it won’t become reserved. To run the commands below you will need to have the disk in the online state. (replacing the disk number with yours).

 

DISKPART> rescan

Please wait while DiskPart scans your configuration...

DiskPart has finished scanning your configuration.

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
  Disk 0    Online          139 GB      0 B
  Disk 2    Online          105 GB  1024 KB

DISKPART> select disk 2

Disk 2 is now the selected disk.

DISKPART> uniqueid disk id=11170901

 

You can come up with your own disk id numbering method. Date based methods work pretty well for smaller environments. I have not yet automated this but plan to do so to make this more scalable. Once your disk ID is changed you can attach this disk and attach this to all your nodes in your cluster and when you run add clustered storage the disk rescan will find this to be a new disk now that the disk id is different then all of the other clustered storage.

No comments: