How to Re-mount a dismounted drive.

Hi Everybody,

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
appreciated.

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
Volume)
2 - Physically remove the drive.
3 - Replace it with an identical drive.
4 - Remount the drive. (Open \.\x:; Lock Volume; Load Storage Media,
Unlock Volume)
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
(HBASTAT_SEL_TO?).

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?

TIA,
Joe

Under NT 4.0-, if you dismount, it will remount as soon as the device is
touched (i.e. unlocking and closing). This has been resolved unfer 2000.

I suspect you are going to need some specialized disk filter driver to
accomplish what you want. I did the same sort oof thing for Compat Flash
disk for NT 4.0.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Joe Derham
Sent: Friday, April 07, 2000 8:09 AM
To: NT Developers Interest List
Subject: [ntdev] How to Re-mount a dismounted drive.

Hi Everybody,

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
appreciated.

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
Volume)
2 - Physically remove the drive.
3 - Replace it with an identical drive.
4 - Remount the drive. (Open \.\x:; Lock Volume; Load
Storage Media,
Unlock Volume)
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
(HBASTAT_SEL_TO?).

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?

TIA,
Joe


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Maybe you could also try issuing an IOCTL_DISK_FIND_NEW_DEVICES.

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Joe Derham
Sent: Friday, April 07, 2000 8:09 AM
To: NT Developers Interest List
Subject: [ntdev] How to Re-mount a dismounted drive.

Hi Everybody,

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
appreciated.

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
Volume)
2 - Physically remove the drive.
3 - Replace it with an identical drive.
4 - Remount the drive. (Open \.\x:; Lock Volume; Load
Storage Media,
Unlock Volume)
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
(HBASTAT_SEL_TO?).

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?

TIA,
Joe


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

Hi Everybody,

Jamey, thanks for the info.

What would I do with IOCTL_DISK_FIND_NEW_DEVICES? To what device/driver
would I send this to? Would it be the NTFS driver?

What would be some the key operations you had in mind for this “specialized
disk filter driver”? I am comfortable with device drivers, but not so much
with filter drivers. Anyone?

I forgot to mention that I am using NT4.0 SP6a & MSVC 6.0.

TIA,
Joe

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Jamey Kirby
Sent: Friday, April 07, 2000 12:51 PM
To: NT Developers Interest List
Subject: [ntdev] RE: How to Re-mount a dismounted drive.

Under NT 4.0-, if you dismount, it will remount as soon as the device is
touched (i.e. unlocking and closing). This has been resolved unfer 2000.

I suspect you are going to need some specialized disk filter driver to
accomplish what you want. I did the same sort oof thing for Compat Flash
disk for NT 4.0.

Jamey

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Joe Derham
Sent: Friday, April 07, 2000 8:09 AM
To: NT Developers Interest List
Subject: [ntdev] How to Re-mount a dismounted drive.

Hi Everybody,

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
appreciated.

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
Volume)
2 - Physically remove the drive.
3 - Replace it with an identical drive.
4 - Remount the drive. (Open \.\x:; Lock Volume; Load
Storage Media,
Unlock Volume)
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
(HBASTAT_SEL_TO?).

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?

TIA,
Joe


You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)


You are currently subscribed to ntdev as: xxxxx@voicenet.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)