Re: [ntdev] is disk/volume in use?

This is of course supported in Windows too. It is uncommon, but hyper-v supports this kind of use

Sent from Surface Pro

From: Maxim S. Shatskih
Sent: ‎Monday‎, ‎October‎ ‎06‎, ‎2014 ‎6‎:‎36‎ ‎AM
To: Windows System Software Devs Interest List

Is there a means/convention for how something claims access to a raw disk or volume?

Surely yes. Just CreateFile of \.\c: or such.

I’m thinking like databases which sometimes use a raw partition as the data store.

In UNIX, yes, in Windows, no.

What disk/volume ioctls are necessary to prevent the user creating a filesystem on the same
volume?

Only the admin can create a file system, and also, if you hold exclusive open on the volume, FORMAT will fail.

How can a driver, or a userspace app determine whether the volume is in use by some other system >component?

Try opening it exclusively.


Maxim S. Shatskih
Microsoft MVP on File System And Storage
xxxxx@storagecraft.com
http://www.storagecraft.com


NTDEV is sponsored by OSR

Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev

OSR is HIRING!! See http://www.osr.com/careers

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer