I have successfully dismounted various drives on my system
programmatically. However, remounting them programmatically has been more
of a challenge. I must being doing something wrong and/or invalid. Here
are my procedures and observations. Any comments or suggestions would be
What I am trying to accomplish is this. I have a single disk drive in a
SCSI-RAID enclosure connected to a RAID controller. The drive is currently
formatted for NTFS. What I would like to accomplish is:
1 - Dismount the drive (Open \\.\x:; Lock Volume; Dismount Volume, Unlock
2 - Physically remove the drive.
3 - Replace it with an identical drive.
4 - Remount the drive. (Open \\.\x:; Lock Volume; Load Storage Media,
5 - Format new drive if necessary.
The drive I am dismounting only contains data files (no executables or
paging files will ever be stored on this disk).
The observations I have made are as follows:
1 - If I only dismount the drive programmatically (Step 1), then NT appears
to automatically remount the drive if I try to view it with explorer or any
other tool. Is this correct behavior? I think I read somewhere that it is,
but I forget where it might have been.
2 - If I dismount the drive, then remove it, and try to view it with
explorer, I get a "The device is not available" error (Naturally). I then
re-insert the same drive back in it's slot. From this point on, I can not
get NT to recognize the drive.
If I use the raid configuration utility, and I rescan the SCSI bus, the
drive appears. I can blink the drive and all, so I assume that as far as
SCSI is concerned, the drive is fine. Afterall, that is what RAID is
supposed to do. Anyways, using different ASPI programs, It appears that
the device is present, however, whenever INQUIREY information is requested
from the device, it reports a "Host Adapter Status" error 17
Questions I have:
1 - Is what I am attempting to do reasonable?
2 - Should what I am attempting to do be possible?
3 - Are my steps to programatically remount a drive correct?