locked
Are there any public APIs that can be used to write disk signatures on a Windows Server 2003/8 system? RRS feed

  • Question

  • We are working on implementing the VSS restore feature through a custom requestor and our VSS HW Provider.  We’d like to be able to perform the same type of restore (essentially LUN Resync) on all supported platforms of Windows.  For pre WS2k8 R2, this requires that we be able to rewrite the disk signature of the source LUN after the resync has happened so that the Snapshot and the source can both co-exist on the system and the related Snapshot associations are not broken within VSS.  We have not been able to locate a windows API that would allow us to do that.  Using DeviceIOControl, with IOCTL_DISK_SET_DRIVE_LAYOUT_EX, results in an “Access Denied” error.  Are there any other programmatic means of achieving this?

    Monday, November 1, 2010 5:16 PM

Answers

  • This happens if the handle you are using to write to the disk wasn't opened with 'GENERIC_WRITE' as dwDesiredAccess in the CreateFile call.
    • Marked as answer by Abhishek Kar Monday, November 1, 2010 10:14 PM
    Monday, November 1, 2010 10:12 PM

All replies

  • This happens if the handle you are using to write to the disk wasn't opened with 'GENERIC_WRITE' as dwDesiredAccess in the CreateFile call.
    • Marked as answer by Abhishek Kar Monday, November 1, 2010 10:14 PM
    Monday, November 1, 2010 10:12 PM
  • Thanks!  That worked.
    Monday, November 1, 2010 10:15 PM