Linux – Changing ‘disk ID’ of Windows GPT disk via Linux

cluster-shared-volumeslinuxwindowswindows-cluster

I have a SAN level snapshot\clone of a Windows cluster shared volume (CSV) whocj i want to mount on the same cluster to retrieve files, as form of backup.

As detailed here: Accessing a storage-side snapshot of a cluster-shared volume

… there are issues with mounting a clone of CSV on the same cluster due to GUID clash.

I have worked out how to achieve what i want with a workaround that does not really.. work for me. I can mount this snaphot\clone of the CSV on another Windows machine, get the disk object via Powershell like so:

$disk = get-disk -Number *number*

… Powershell has a set-disk method, which enables me to change the disk ID:

Set-Disk -Guid {New GUID}

I can now mount this clone back into the same cluster, there is now no GUID clash and i can access it as it were any other NTFS volume.

What i would like to do is change this disk identifier via a Linux machines so i can automate the process sensibly. I see a see examples of how this may be possible if the disk is MBR, but is the feasible if the machine is GPT?

Any help would would be greatly appreciated.

Best Answer

gdisk should help: have a look at 'c', 'g' and 'f' from the extra functionality menu.

See ubuntu trusty gdisk manpage.

Related Topic