Hi, I am having trouble of forcing NT to create \Device\Harddiskx and
PhysicalDrivex for new scsi logical disks detected through
IOCTL_SCSI_RESCAN_BUS. On W2k, I can simply use
CM_Locate_DevNode(&devInst, NULL, CM_LOCATE_DEVNODE_NORMAL) and
CM_Reenumerate_DevNode(devInst, 0) to force W2k to scan, and enumerate and
create device objects \Device\HarddiskVolumex\ for the new discovered
logical disks without running Disk Management. But on NT, is there a
similar Ioctl calls that I can use which will do the same thing without
running windisk? Thanks!!
IOCTL_SCSI_RESCAN_BUS should kick everything off. As long as they’re
simple volumes (ie. not stripes, spans or mirrors) they should just show
up one PNP gets around to doing the installation.
-p
-----Original Message-----
From: John Lee [mailto:xxxxx@emc.com]
Sent: Friday, October 11, 2002 6:56 AM
To: NT Developers Interest List
Subject: [ntdev] How to make NT create \Device\Harddiskx for the new
detected scsi devices
Hi, I am having trouble of forcing NT to create \Device\Harddiskx and
PhysicalDrivex for new scsi logical disks detected through
IOCTL_SCSI_RESCAN_BUS. On W2k, I can simply use
CM_Locate_DevNode(&devInst, NULL, CM_LOCATE_DEVNODE_NORMAL) and
CM_Reenumerate_DevNode(devInst, 0) to force W2k to scan, and enumerate
and create device objects \Device\HarddiskVolumex\ for the new
discovered logical disks without running Disk Management. But on NT, is
there a similar Ioctl calls that I can use which will do the same thing
without running windisk? Thanks!!
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%
Peter,
Thanks for the response. I have used IOCTL_SCSI_RESCAN_BUS to rescan the
bus, but after the rescan NT did not create a new\Device\Harddiskx. I
have used WinObj to verify this. I am wondering if my rescan ioctl is not
send properly. Could you verify my code, I am assuming this ioctl is send
to \.\Scsix: (e.g. \.\Scsi1: )devices. All my Logic disks are NTFS
filesystems.
DiskHandle = CreateFile( Device,
AccessMode,
ShareMode,
NULL,
OPEN_EXISTING,
0,
NULL );
if (DiskHandle == INVALID_HANDLE_VALUE)
{
Status = SC_STATUS_INVALID_DEVICE_TYPE;
}
else
{
Status = DeviceIoControl( DiskHandle,
//IOCTL_STORAGE_FIND_NEW_DEVICES,
IOCTL_SCSI_RESCAN_BUS,
NULL,
0,
NULL,
0,
&NumBytesReturned,
0 );
CloseHandle( DiskHandle );
that looks right. You’re getting back STATUS_SUCCESS?
that looks right. Do the devices show up in device manager after the
rescan?
-p
-----Original Message-----
From: John Lee [mailto:xxxxx@emc.com]
Sent: Friday, October 11, 2002 10:25 AM
To: NT Developers Interest List
Subject: [ntdev] RE: How to make NT create \Device\Harddiskx for the new
detected scsi devices
Peter,
Thanks for the response. I have used IOCTL_SCSI_RESCAN_BUS to rescan
the bus, but after the rescan NT did not create a new\Device\Harddiskx.
I have used WinObj to verify this. I am wondering if my rescan ioctl is
not send properly. Could you verify my code, I am assuming this ioctl is
send to \.\Scsix: (e.g. \.\Scsi1: )devices. All my Logic disks are
NTFS filesystems.
DiskHandle = CreateFile( Device,
AccessMode,
ShareMode,
NULL,
OPEN_EXISTING,
0,
NULL );
if (DiskHandle == INVALID_HANDLE_VALUE)
{
Status = SC_STATUS_INVALID_DEVICE_TYPE;
}
else
{
Status = DeviceIoControl( DiskHandle,
//IOCTL_STORAGE_FIND_NEW_DEVICES,
IOCTL_SCSI_RESCAN_BUS,
NULL,
0,
NULL,
0,
&NumBytesReturned,
0 );
CloseHandle( DiskHandle );
You are currently subscribed to ntdev as: xxxxx@microsoft.com To
unsubscribe send a blank email to %%email.unsub%%