Search code examples
winapivolume-shadow-service

How do you create a Writable VSS Snapshot?


This implies you can create a writable vss snapshot: Usability limit for Volume Shadow Copy Service (VSS) in Windows

But how do you do it? I've played around with things, I can get a FAT/FAT32 partition VSS snapshot to be writable by removing the read-only flag on the volume, but for NTFS it reports ERROR_WRITE_PROTECT


Solution

  • Shadow copies are read-only. It requires additional operation if you want to convert a shadow copy to a read/write LUN.

    IVssBackupComponentsEx2::BreakSnapshotSetEx with VSS_BREAKEX_FLAG_MAKE_READ_WRITE option can make the shadow copy LUN be exposed to the host as a read-write volume.

    For an example you can refer to official sample: VShadow Volume Shadow Copy Service sample. Use -bw command to break the shadow set into writable volumes.