After reading the windows vshadow copy service documentation about read-only flag,
>>Immediately after IVssProviderCreateSnapshotSet::EndPrepareSnapshots, VSS will set the read-only, hidden, no drive letter, and shadow copy flags on all affected LUNs.
https://docs.microsoft.com/zh-cn/windows/desktop/VSS/the-shadow-copy-creation-process
In my opinion, the read-only, hidden, no drive letter, and shadow copy flags are set in volume rather than disk. As I execute attribute volume command of Diskpart, the result will show the situation of read-only, hidden, no drive letter, and shadow copy
on the volume.
But if my understanding is right, the copy will be executed during CommitSnapshots. During CommitSnapshots, the new volume(A copy of the volume of the source disk) on target disk will be produced. CommitSnapshots is executed after EndPrepareSnapshots. The flag
of the new volume is the same with the falg in EndPrepareSnapshots ?
And if volume does not exist in EndPrepareSnapshots, how to set read-only, shadow copy flag?
Thanks