Resignature Disk with Diskpart on Win OS
You can use diskpart on Microsoft Windows operating systems to change the signature on a cloned storage volume during recovery scenarios or cloning exercises.
Consider the following configurations:
Configuration | Manual Resignature Required? | Another Node Required to Resignature? |
---|---|---|
Clone from VSS sync snapshot of a clustered disk | No1 | No2 |
Clone from VSS sync snapshot of a non-clustered disk | No1 | No |
Clone from non-VSS sync snapshot of a non-clustered disk | No1 | No |
Clone from non-VSS sync snapshot of a clustered disk | Yes | Yes3 |
- If Volume Shadow Copy processes automatically mark the Windows volume as a snapshot or a disk collision error is detected on a non-clustered disk, the operating system can automatically detect, generate, and assign a new randomly unique signature if the disk is brought online via diskpart or diskmgmt.msc. Therefore, clones that are created from these snapshots can be presented back to the original host without conflict.
- You must take additional actions as outlined in KB-000244 to reset the VSS
metadata on the volume before you add the cloned disk back to the cluster if you
want to do all the following:
- Present the cloned volume back to the original cluster.
- Use a clone created from a VSS snapshot of a clustered volume.
- Add the cloned volume back to the cluster as a clustered disk.
- The original parent volume must still be connected to and in use on the original host.
As shown above, Microsoft clustered configurations create some additional challenges. When mounting a cloned volume of a clustered disk back to a clustered Microsoft host, a disk shows as reserved in Disk Management. By design, the Microsoft Cluster Disk Driver (clusdisk.sys) marks the disk as Reserved (as observed in Disk Management or diskpart) if the clone has the same signature as the original parent volume that is still a disk resource in the cluster.
If the disk in question was not marked as a snapshot by a previous VSS backup operation, the Windows operating system cannot automatically overcome disk signature collisions in this configuration on any node in the cluster. When the original parent volume is presented to the cluster, actions cannot be taken against the clone, even outside of the cluster services, on any member nodes in the cluster, because clusdisk.sys marked the disk Reserved (for example, only the cluster can perform operations on the disk).
Manual user intervention is required to overcome signature collisions on clones of clustered disks that were created from non-VSS snapshots. Diskpart UniqueID requires Windows 2008 or later.
- From the array OS, click the original volume.
- Click the Snapshots tab.
- Select the snapshot and click Clone.
- From the list of volumes, click the cloned volume.
- Click Edit and go to the Access tab.
- Remove the existing ACL.
- Add the initiator group that contains the temporary server.
- Using the HPE Storage Connection Manger or iScsiCpl, connect to the cloned
volume on a node outside the cluster.NOTE: At this point, with the cloned volume connected to a node outside the cluster, you have the option to copy off the required files over the network for recovery back to the intended target. However, the remainder of this topic discusses the signature process with the intent of presenting the cloned volume back to one or more nodes in the original cluster.
- On the temporary host, connect the clone volume using one of the following
procedures.
For Fibre Channel, go into disk management and rescan the disks.
For Storage Connection Manager Select the Volumes tab and note the disk number in the Mapping Info column for the desired cloned volume. For iScsiCpl Under the Targets tab, select the desired cloned volume, devices, or both and note the number of the legacy device name: PhysicalDrive#, click OK, click OK. - Identify the disk number of the newly attached disk in Disk Management.
- Open a command prompt.
- Open the diskpart command line utility.
diskpart
- View the disks.
list disk
DISKPART> list disk Disk ### Status Size Free Dyn Gpt -------- ------------- ------- ------- --- --- Disk 0 Online 40 GB 0 B Disk 1 Online 10 GB 0 B * Disk 2 Online 10 GB 0 B *
- Select the disk
number.
DISKPART> select disk 1 Disk 1 is now the selected disk.
- View the details about the disk.
detail disk
DISKPART> detail disk Nimble Server Multi-Path Disk Device Disk ID: {8A014FBD-47E1-4919-A69E-B659A6E63244} <--** BEFORE DISK ID CHANGE Type : iSCSI Status : Online Path : 0 Target : 3 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 3 E MBX09-TESTD NTFS Partition 9 GB Healthy
- Clear the attributes disk.
attributes disk clear readonly
DISKPART> attributes disk clear readonly Disk attributes cleared successfully.
- Display the current disk signature.
uniqueid disk
DISKPART> uniqueid disk Disk ID: A014FBD-47E1-4919-A69E-B659A6E63244
- NOTE: Disk IDs need to be changed by at least one character. Then, the disk can be mounted back to any nodes in the original cluster.Change the last character and apply a new ID.
DISKPART> uniqueid disk id=8A014FBD-47E1-4919-A69E-B659A6E63245 DISKPART>
In this example, the last character has been changed from 4 to 5.
- View the details about the disk.
detail disk
DISKPART> detail disk Nimble Server Multi-Path Disk Device Disk ID: {8A014FBD-47E1-4919-A69E-B659A6E63245} Type : iSCSI Status : Online Path : 0 Target : 3 LUN ID : 0 Location Path : UNAVAILABLE Current Read-only State : No Read-only : No Boot Disk : No Pagefile Disk : No Hibernation File Disk : No Crashdump Disk : No Clustered Disk : No Volume ### Ltr Label Fs Type Size Status Info ---------- --- ----------- ----- ---------- ------- --------- -------- Volume 3 E MBX09-TESTD NTFS Partition 9 GB Healthy
- Using the Storage Connection Manager or iScsiCpl, disconnect the clone from the temporary host.
- On OS, from the list of volumes, click the cloned volume.
- Click Edit and go to the Access tab.
- Remove the temporary ACL from the volume.
- Reapply the original ACL to give the original hosts access to the volume.
- Connect the cloned volume on the original cluster nodes and take any additional action needed for recovery.