The most reliable way is to determine the
volume's location on disk(s) by means of
IOCTL_VOLUME_GET_VOLUME_DISK_EXTENTS, then
"safely remove" the volume by means of
CM_Query_And_Remove_SubTree.
Then you can open the disk device(s) and
write at the volume's location without
hassle.
Afterwards perform a CM_Reenumerate_DevNode
on the root node to bring the volume back
to life.
Uwe