TechTalkz.com Logo Ask the Experts!

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Microsoft > Microsoft Device Drivers

Rescan disks doesn't rescan disks?

Microsoft Device Drivers

 
 
Thread Tools Display Modes
Unread 31-03-2008, 06:25 AM   #1
Norman Diamond
Guest
 
Posts: n/a
Rescan disks doesn't rescan disks?

In Windows XP SP2, Computer Administration -> Disk Administration, Action ->
Rescan Disks seems to be inconsistent as to whether it rescans disks or not.

If I get permission from Windows to detach a USB hard drive, then actually
detach it and reattach it, then Action -> Rescan Disks rescans the disk.
But if I don't detach and reattach, i.e. if a disk just remains connected,
then Rescan Disks doesn't rescan it.

Does this work differently for anyone else?

 
Unread 31-03-2008, 07:17 AM   #2
Maxim S. Shatskih
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

> If I get permission from Windows to detach a USB hard drive, then actually
> detach it and reattach it, then Action -> Rescan Disks rescans the disk.
> But if I don't detach and reattach, i.e. if a disk just remains connected,
> then Rescan Disks doesn't rescan it.


Detach/reattach reactivates the drive.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

 
Unread 31-03-2008, 08:18 AM   #3
Norman Diamond
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

"Maxim S. Shatskih" <maxim@storagecraft.com> wrote in message
news:eufLkrvkIHA.748@TK2MSFTNGP04.phx.gbl...
>> If I get permission from Windows to detach a USB hard drive, then
>> actually detach it and reattach it, then Action -> Rescan Disks rescans
>> the disk. But if I don't detach and reattach, i.e. if a disk just
>> remains connected, then Rescan Disks doesn't rescan it.

>
> Detach/reattach reactivates the drive.


It sounds like you agree with me. So does anyone know why Disk
Administrator has a misleading non-working "Rescan Disks" command?

 
Unread 31-03-2008, 01:30 PM   #4
Alexander Grigoriev
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

"Safe removal" for USB disk actually ejects the usbstor device. At that
time, the LUN and volume are not enumerated anymore; there is nothing to
rescan for Disk Manager.

"Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
news:OnHuBevkIHA.3636@TK2MSFTNGP02.phx.gbl...
> In Windows XP SP2, Computer Administration -> Disk Administration,
> Action -> Rescan Disks seems to be inconsistent as to whether it rescans
> disks or not.
>
> If I get permission from Windows to detach a USB hard drive, then actually
> detach it and reattach it, then Action -> Rescan Disks rescans the disk.
> But if I don't detach and reattach, i.e. if a disk just remains connected,
> then Rescan Disks doesn't rescan it.
>
> Does this work differently for anyone else?



 
Unread 01-04-2008, 01:23 AM   #5
Norman Diamond
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

It makes sense to me that an ejected disk isn't rescanned. It makes sense
to me that a reattached disk is rescanned.

My question is why disks that were never ejected at all aren't rescanned.
Consider a disk that is attached once, remains attached, gets repartitioned,
remains attached, and the user wants its new partitions to be recognized.
What is the purpose of the Rescan Disks menu entry? If the only way to get
a disk to be rescanned is to eject it and reattach it, who needs a command
whose name says rescan but which doesn't rescan?


"Alexander Grigoriev" <alegr@earthlink.net> wrote in message
news:um9%23Y%23ykIHA.5080@TK2MSFTNGP02.phx.gbl...
> "Safe removal" for USB disk actually ejects the usbstor device. At that
> time, the LUN and volume are not enumerated anymore; there is nothing to
> rescan for Disk Manager.
>
> "Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
> news:OnHuBevkIHA.3636@TK2MSFTNGP02.phx.gbl...
>> In Windows XP SP2, Computer Administration -> Disk Administration,
>> Action -> Rescan Disks seems to be inconsistent as to whether it rescans
>> disks or not.
>>
>> If I get permission from Windows to detach a USB hard drive, then
>> actually detach it and reattach it, then Action -> Rescan Disks rescans
>> the disk. But if I don't detach and reattach, i.e. if a disk just remains
>> connected, then Rescan Disks doesn't rescan it.
>>
>> Does this work differently for anyone else?

>
>


 
Unread 01-04-2008, 06:22 AM   #6
David Craig
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

There is a specific series of operations that a format program must follow
to ensure that the media is locked properly and then released to the OS in a
way that will force a remount operation. Using Disk Manager to 'rescan' is
NOT the proper procedure. Use IrpTracker and the fastfat source code to see
what happens. I have a format program that does it properly, but it has
been years since I looked at it. It contains confidential information since
it works for SmartMedia. I still haven't thrown away my 1998 1.3 megapixel
camera that can't use anything larger than a 16MB SmartMedia.

Look at the storage and disk headers that come with the WDK and SDK, too.
Also look at CreateFile and exclusive write access to physical drives. The
sequence of operations including specific IoCtls is very important, but when
done correctly will work.

Lately I have not been doing much in the storage arena, but have been
working on NDIS miniport drivers instead.


"Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
news:%23isnAV5kIHA.2396@TK2MSFTNGP02.phx.gbl...
> It makes sense to me that an ejected disk isn't rescanned. It makes sense
> to me that a reattached disk is rescanned.
>
> My question is why disks that were never ejected at all aren't rescanned.
> Consider a disk that is attached once, remains attached, gets
> repartitioned, remains attached, and the user wants its new partitions to
> be recognized. What is the purpose of the Rescan Disks menu entry? If the
> only way to get a disk to be rescanned is to eject it and reattach it, who
> needs a command whose name says rescan but which doesn't rescan?
>
>
> "Alexander Grigoriev" <alegr@earthlink.net> wrote in message
> news:um9%23Y%23ykIHA.5080@TK2MSFTNGP02.phx.gbl...
>> "Safe removal" for USB disk actually ejects the usbstor device. At that
>> time, the LUN and volume are not enumerated anymore; there is nothing to
>> rescan for Disk Manager.
>>
>> "Norman Diamond" <ndiamond@newsgroup.nospam> wrote in message
>> news:OnHuBevkIHA.3636@TK2MSFTNGP02.phx.gbl...
>>> In Windows XP SP2, Computer Administration -> Disk Administration,
>>> Action -> Rescan Disks seems to be inconsistent as to whether it rescans
>>> disks or not.
>>>
>>> If I get permission from Windows to detach a USB hard drive, then
>>> actually detach it and reattach it, then Action -> Rescan Disks rescans
>>> the disk. But if I don't detach and reattach, i.e. if a disk just
>>> remains connected, then Rescan Disks doesn't rescan it.
>>>
>>> Does this work differently for anyone else?

>>
>>

>



 
Unread 01-04-2008, 07:18 AM   #7
Maxim S. Shatskih
Guest
 
Posts: n/a
Re: Rescan disks doesn't rescan disks?

> There is a specific series of operations that a format program must follow
> to ensure that the media is locked properly and then released to the OS in a


Namely:
- open the volume
- FSCTL_LOCK_VOLUME
- write the new empty FS
- FSCTL_DISMOUNT_VOLUME
- FSCTL_UNLOCK_VOLUME

Volume will then be mounted on first file open on it.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com

 
 

Thread Tools
Display Modes



< Home - Windows Help - MS Office Help - Hardware Support >


New To Site? Need Help?

All times are GMT. The time now is 02:40 AM.


vBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2013, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional