Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

Restored disk shows 'Offline' with a signature collision in Windows: mount a backup copy beside the original

Technical article
Backup & Recovery

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

If a restored, cloned or replicated disk appears in Disk Management or diskpart as Offline with the message "The disk is offline because it has a signature collision with another disk that is online", Windows has found two disks that carry the same identifier and has refused to use the second one. It happens when the copy is attached to the same server (or the same virtual machine) as the disk it was copied from. The fix is to give the copy a different identifier, but that is a write to the copy's partition table, and on a bootable Windows disk it can leave the copy unable to start.

What the error means

Every disk Windows sees has an identifier. On an MBR disk it is a four-byte signature; on a GPT disk it is a GUID. Microsoft's diskpart uniqueid reference describes the command as displaying or setting "the GUID partition table (GPT) identifier or master boot record (MBR) signature" for the disk with focus.

Windows needs these to be unique. In his archived post Fixing Disk Signature Collisions (displayed date 6 November 2011), Mark Russinovich explains that when you attach a disk whose signature equals one already attached, Windows "keeps the disk in 'offline' mode and doesn't read its partition table or mount its volumes". That is why you cannot simply browse the copy to look at it: nothing under it is mounted.

Two things make this a restore problem rather than a curiosity:

  • A restore or clone copies the identifier along with the data. Broadcom's knowledge base article Windows guest OS marks RDM disk as "Offline" due to a disk signature collision after storage replication (no date shown) describes a replicated LUN that carries the source's MBR or GPT, and therefore the source's signature. When both disks reach the same virtual machine, Windows keeps the second one offline "To prevent data corruption or drive letter conflicts, Windows forces the second disk to remain in an offline state."
  • Windows records the signature elsewhere. Russinovich shows that, from Windows Vista onwards, the Boot Configuration Database (BCD) stores the disk signature, so a bootable disk's startup configuration points at its signature.

This article covers one specific offline reason. A disk can also be offline because of the SAN policy, which is a different setting that applies to newly discovered disks. Microsoft's san reference says the policy decides "whether a newly discovered disk is brought online or remains offline, and whether it becomes read/write or remains read-only", with the options onlineAll, offlineAll and offlineShared. The signature comparison below is what separates the two: a collision needs two matching values.

Likely causes

Cause What you see How to confirm
Restored or cloned virtual disk attached to the same VM or host as its source Disk is Offline; message names a signature collision Compare the signature of the offline disk with the online disk (steps below); they match
Replicated or snapshotted LUN presented to the same server as the original (for example as a raw device mapping) Replica shows Offline while the source is Online Same comparison; the replica was created by array or storage replication
A virtual disk produced from a physical server attached back to the server it came from Offline disk right after attaching the VHD Same comparison; Russinovich describes exactly this case
Disk is offline because of the SAN policy, not a collision Offline, and the signatures of the offline and online disks differ Run san in diskpart and read the policy; compare the signatures
Disk was taken offline by an administrator or script Offline, and the signatures differ Compare the signatures; ask who manages the server

Prove the cause before changing anything

Everything in this section only reads. The commands below are taken from Microsoft's documentation and have not been run. Run them from an elevated command prompt.

  1. Start diskpart and list the disks. The diskpart reference shows list disk and select disk, and the list reference says the listing includes size, free space, basic or dynamic, and MBR or GPT:

    diskpart
    list disk
    
  2. Select the offline disk and display its signature (the uniqueid disk command with no id= displays the value):

    select disk 2
    uniqueid disk
    
  3. Select the online disk it is supposedly a copy of, and display its signature the same way. If the two values are identical, the collision is confirmed. detail disk (reference) also shows the properties of the selected disk and its volumes.

  4. Check the SAN policy with san (no parameters displays the current policy, per the san reference).

Write down the original signature of the copy before you do anything else. If you later need to put it back, you will need that value.

Decide whether the copy has to boot. This is the question that determines the fix:

  • If the copy only holds data you want to read or copy off, a new identifier costs you nothing.
  • If the copy is a Windows system disk you intend to start, its BCD refers to the old signature, and changing it can leave the disk unbootable.

Example (illustrative). A server FILE01 has disk 0 (system) and disk 1 (data). During a restore test, an administrator attaches a restored copy of disk 1 to FILE01 as disk 2. list disk shows disk 2 as Offline. uniqueid disk on disks 1 and 2 returns the same eight-digit value. That is the collision. The copy is only data, so a new identifier is acceptable. Had the copy been a restored system disk, the plan would be different (see below).

Fix

Pick the path that fits what you need from the copy.

Path A: attach the copy somewhere the original is not (preferred for bootable disks)

The collision exists only because both disks are visible to one Windows instance. Russinovich notes that when you attach the disk to a running Windows system where there is no collision, "it will be online and Windows will assign drive letters to the volumes". If the copy needs to remain bootable and unchanged, attach it to a different server or VM (or detach the original from the machine) and bring it online there. Nothing about its identifier changes.

Path B: give the copy a new identifier (data copies only)

Caution: this writes to the copy's partition table and changes its identity. Work on the copy, never on the only copy of the data, and confirm the disk number before you run it, because the same command on the wrong disk will rename a live disk. Microsoft documents the syntax: "For MBR disks, this parameter specifies a 4-byte (DWORD) value in hexadecimal form for the signature. For GPT disks, this parameter specifies a GUID".

select disk 2
uniqueid disk id=<new value>

The documentation examples use a DWORD for MBR (uniqueid disk id=5f1b2c36) and a GUID for GPT (uniqueid disk id=baf784e7-6bbd-4cfb-aaac-e86c96e166ee). Use a value that is not in use on the machine. Broadcom's article gives the same command as its resolution for the replicated RDM case.

Then bring the disk online. The online disk reference shows the command with the disk selected:

online disk

Do not set the disk read-only first. The same page warns that the command "fails if it's used on a read-only disk". If you want protection against accidental writes after it is online, Microsoft documents attributes disk set readonly and the PowerShell Set-Disk -Number <n> -IsReadOnly $true (Set-Disk reference). Apply that after the disk is online.

Path C: let Windows choose (Disk Management Online command)

Right-click the offline disk and choose Online. Russinovich warns that "Windows will without warning generate a new random disk signature and assign it to the disk by writing it to the MBR." It works, but you do not control the value and you get no prompt. For a system disk this is the riskiest option.

Recovering a bootable copy whose identifier was changed

If the copy was a Windows system disk and the identifier changed, the BCD "entries become orphaned, linked with the previous disk signature", and the boot loader fails to find the disk. Russinovich's repair is to give the disk its original signature back: attach it to a running Windows system where it comes online, load the disk's \Boot\BCD file as a registry hive, read the signature in the Windows Boot Manager entry, run select disk and uniqueid disk id=<original> in diskpart, and then detach it. He warns that Windows will force the disk offline when the original signature is set, and "Avoid bringing the disk online again or you'll undo your work." That procedure edits boot data on a restored system disk; practise it on a copy first.

Confirm the fix

  • list disk shows the copy as Online, and uniqueid disk returns different values for the copy and the original.
  • The volumes on the copy are mounted and the files you expected are present. Do not accept "Online" alone as proof: open the data you restored and check it.
  • If the copy is a data disk from a backup, compare a few files against the source by size and a checksum of your choice, since a restore test is the real proof that the backup is usable.
  • If the copy is meant to boot, the only proof is booting it in an isolated network (a virtual machine with its network disconnected, so it cannot clash with the live server by name or address).

What to watch afterwards

  • Restore tests that attach disk copies to a production host will repeat this. Prefer a dedicated restore or test host for mounting copies.
  • Disks that appear offline after a replication or snapshot job are the same fault. If a storage job presents replicas to a production server, add a check that compares signatures before the replica is mapped.
  • Changing the SAN policy to onlineAll is not a fix for this. The san reference warns that onlineAll "on a server that shares disks could lead to data corruption" unless the server is part of a cluster, and it does not remove the collision rule.

Risks and limits

  • These commands were taken from Microsoft and Broadcom documentation and have not been run or lab-tested.
  • The collision behaviour is documented from Windows Vista onwards in a 2011 archived post that has been moved to Microsoft's archive. Microsoft's current command references document the commands, not the collision behaviour, which is described only for Windows Vista and later.
  • The Broadcom article has no displayed date. It states that "ERASE PARTITIONS" in vSphere Client beforehand does not clear the problem; that statement is Broadcom's, for one product.
  • The Russinovich BCD repair is from a blog post, not a supported Microsoft procedure. It involves loading a registry hive and editing boot data. Treat it as an expert procedure.
  • Changing an identifier on a disk that is protected by BitLocker, or one that other software tracks by signature, has consequences this article does not cover. See the related article on BitLocker recovery keys.

Sources