Microsoft Windows Vista Community Forums - Vistaheads
Recommended Download - Clean, repair and optimize your system



Welcome to the Microsoft Windows Vista Community Forums - Vistaheads, YOUR Largest Resource for Windows Vista related information.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so , join our community today!

If you have any problems with the registration process or your account login, please contact us.

Driver Scanner 2009 - Free Scan Now

Vista refuses to safely remove external usb hard drive

microsoft.public.windows.vista.general




Recommended Fix - Fix Vista Errors and Optimize Performance

Click On Your Flag for Translation
Simplified Chinese French Spanish Italian Portugeuse Japanese German Dutch
Driver Scanner 2009 - Free Scan Now
Reply
  #1 (permalink)  
Old 03-01-2007
Roof Fiddler
 

Posts: n/a
Vista refuses to safely remove external usb hard drive
I have no programs accessing anything on my external usb hd, and no explorer
windows or command prompts running. The activity light on the drive shows no
activity. When I click the "safely remove hardware" icon in the task tray
and click "safely remove usb mass storage device - drive (f" it says
"Windows can't stop your 'generic volume' device because it is in use." and
immediately the external drive goes into a flurry of activity with its
activity light staying on almost constantly. Windows resource monitor shows
that svchost is the culprit, reading the drive at about 2MB/sec
continuously. Sysinternals process explorer confirms that nothing besides
"System" and "svchost.exe" have any handles open for the drive. The disk
activity continues for several minutes, then stops. If I try "safely remove
hardware" again, it again refuses, and goes into another flurry of disk
activity. The result is that I can't safely remove the device, unless I shut
down the machine first, which kind of defeats the point of usb drives being
hot pluggable. This is infuriating.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-01-2007
Alexander Suhovey
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
Roof Fiddler,

I've seen this happening on XP too every now and then, so there's nothing
new in this behavior on Vista. Two ways I usually troubleshoot/workaround
this issue: configuring drive for quick removal and tracking down offending
process.

1. To configure drive for quick removal, Open Device Manager; expand "Disk
drives" node; double click drive in question; on the Policies tab make sure
"Optimize for quick removal" radio-button is checked. This will slow down
file operations on the drive but will allow you to remove it at any moment
without even using (sometimes failing) "Safe Removal" function.

2. Two usual suspects that can keep your USB drive busy are System Restore
and Indexing. I'd check their settings to see if your system configured to
either create restore points for this drive or to index its contents for
instant search. Also, I'd find out exact instance of svchost that has
handles open to this drive and which services are running under this
instance. I use Sysinternals' handle.exe and built-in tasklist.exe
command-line utilities for this. First, you run

handle DRIVE:

to get PIDs of processes that have handles open on the drive. Then you can
run

tasklist /SVC /FI "PID eq PROCESS_ID"

where PROCESS_ID is the PID you've got from handle. If it's svchost that has
handles open, you'll get the list of services that run under this instance
of svchost.

To get friendly names of services, you can use sc.exe built-in utility:

sc qc SERVICE_NAME | find /i "DISPLAY_NAME"

where SERVICE_NAME is the name you've got from taskilst output.



Example:
======================8<========================
C:\>handle H:\

Handle v3.2
Copyright (C) 1997-2006 Mark Russinovich
Sysinternals - www.sysinternals.com

System pid: 4 1C8:
H:\$Extend\$RmMetadata\$TxfLog\$TxfLogContainer00. ..
System pid: 4 270:
H:\$Extend\$RmMetadata\$TxfLog\$TxfLog.blf
System pid: 4 27C:
H:\$Extend\$RmMetadata\$TxfLog\$TxfLogContainer00. ..
System pid: 4 288: H:\$Extend\$RmMetadata\$Txf
System pid: 4 368: H:\System Volume
Information\{3808876b-c176-4e48-b7...
System pid: 4 36C: H:\System Volume
Information\{477ccf48-a888-11db-b5...
svchost.exe pid: 1148 5BC: H:\$Extend\$ObjId
svchost.exe pid: 1148 5C4: H:\System Volume Information\tracking.log

C:\>tasklist /SVC /FI "PID eq 1148"

Image Name PID Services
=============== ========= =======================================
svchost.exe 1148 AudioEndpointBuilder, CscService,
EMDMgmt,
hidserv, Netman,
PcaSvc, SysMain,
TabletInputService,
TrkWks, UmRdpService,
UxSms,
WdiSystemHost, WPDBusEnum, wudfsvc

C:\>sc qc AudioEndpointBuilder | find "DISPLAY_NAME"
DISPLAY_NAME : Windows Audio Endpoint Builder

C:\>sc qc CscService | find "DISPLAY_NAME"
DISPLAY_NAME : Offline Files

C:\>sc qc EMDMgmt | find "DISPLAY_NAME"
DISPLAY_NAME : ReadyBoost

C:\bin>
======================8<========================

Hope this helps,

--
Alexander Suhovey




"Roof Fiddler" <fiddler@roof.com> wrote in message
news:OxkAL$pQHHA.4448@TK2MSFTNGP04.phx.gbl...
>I have no programs accessing anything on my external usb hd, and no
>explorer windows or command prompts running. The activity light on the
>drive shows no activity. When I click the "safely remove hardware" icon in
>the task tray and click "safely remove usb mass storage device - drive
>(f" it says "Windows can't stop your 'generic volume' device because it
>is in use." and immediately the external drive goes into a flurry of
>activity with its activity light staying on almost constantly. Windows
>resource monitor shows that svchost is the culprit, reading the drive at
>about 2MB/sec continuously. Sysinternals process explorer confirms that
>nothing besides "System" and "svchost.exe" have any handles open for the
>drive. The disk activity continues for several minutes, then stops. If I
>try "safely remove hardware" again, it again refuses, and goes into another
>flurry of disk activity. The result is that I can't safely remove the
>device, unless I shut down the machine first, which kind of defeats the
>point of usb drives being hot pluggable. This is infuriating.
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-01-2007
Uwe Sieber
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
Roof Fiddler wrote:
> I have no programs accessing anything on my external usb hd, and no
> explorer windows or command prompts running. The activity light on the
> drive shows no activity. When I click the "safely remove hardware" icon
> in the task tray and click "safely remove usb mass storage device -
> drive (f" it says "Windows can't stop your 'generic volume' device
> because it is in use." and immediately the external drive goes into a
> flurry of activity with its activity light staying on almost constantly.
> Windows resource monitor shows that svchost is the culprit, reading the
> drive at about 2MB/sec continuously. Sysinternals process explorer
> confirms that nothing besides "System" and "svchost.exe" have any
> handles open for the drive. The disk activity continues for several
> minutes, then stops. If I try "safely remove hardware" again, it again
> refuses, and goes into another flurry of disk activity. The result is
> that I can't safely remove the device, unless I shut down the machine
> first, which kind of defeats the point of usb drives being hot
> pluggable. This is infuriating.


This is a known bug in XP that seems to be still present in Vista.
When a save removal is tried Windows can send a message about that
and all processes that hold open but non essential handles should
close them now. But the indexing service doesn't care.

My commandline tool RemoveDrive can prepare a drive for save removal:
http://www.uwe-sieber.de/files/removedrive.zip

Started with parameter -i it stops the indexing service for a moment.
Horrible workaround, but it works...
Sample:

removedrive u: -i

For stopping a service admin previleges are required.


Greetings from Germany

Uwe








Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-01-2007
Roof Fiddler
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
"Alexander Suhovey" <asuhovey@gmail.com> wrote in message
news:E3F736DD-437B-4E98-B08B-0FEABFD9E608@microsoft.com...
[snip]
> 1. To configure drive for quick removal

[snip]
> 2. Two usual suspects that can keep your USB drive busy are System Restore
> and Indexing.

[snip]
> handle DRIVE:

[snip]
> tasklist /SVC /FI "PID eq PROCESS_ID"

[snip]
> sc qc SERVICE_NAME | find /i "DISPLAY_NAME"


Very useful info! Thanks. I'd already rebooted the machine in order to
safely remove the drive by the time I got your message, but I tried your
suggestions just now and the svchost with handles open on the drive has the
services
Windows Audio Endpoint Builder
ReadyBoost
Infrared monitor service
Network Connections
Program Compatibility Assistant Service
Superfetch
Tablet PC Input Service
Distributed Link Tracking Client
Desktop Window Manager Session Manager
Diagnostic System Host
WLAN AutoConfig
Portable Device Enumerator Service
The only services in that list I can think might be using the drive are
readyboost and superfetch. The drive is a regular hard drive, not a flash
drive, so readyboost wouldn't be using it, so that leaves just superfetch.
But I don't know if this current service list is the same as it was
yesterday when I was unable to safely remove the drive, and I can't test now
because I'm using the drive. If I'm again unable to remove the drive the
next time I try, I'll check the services again and post the list.

The drive is not set "Optimize for quick removal" because even if it were I
wouldn't want to remove it without successfully using the "safe removal"
function. Using optimize for quick removal might prevent filesystem
corruption when I just unplug it with no warning, but it won't prevent
potential data loss or other problems with programs which actually have
handles open on the drive for legitimate reasons. I guess I could manually
check the handles every time before yanking the drive but I really want to
be able to use the "safe removal" function as an easy reminder that I might
have forgotten to close some file I had open on the drive.

System Restore is turned off, and indexing is not enabled for this drive.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-01-2007
Opinicus
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
"Roof Fiddler" <fiddler@roof.com> wrote

>> 2. Two usual suspects that can keep your USB drive busy are System
>> Restore and Indexing.


Will Vista stop turning System Restore on every time I connect a USB drive?

If it will, that's reason enough to move on from WinXP in my book.

--
Bob
http://www.kanyak.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 03-01-2007
Alexander Suhovey
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
"Roof Fiddler" <fiddler@roof.com> wrote in message
news:esV0zxwQHHA.1860@TK2MSFTNGP06.phx.gbl...
> The drive is not set "Optimize for quick removal" because even if it were
> I wouldn't want to remove it without successfully using the "safe removal"
> function.


I can see your point, but turning off write cache doesn't remove tray icon
so you can still use it to safely remove your USB drive.

--
Alexander Suhovey

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 03-01-2007
Uwe Sieber
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
Opinicus wrote:
> "Roof Fiddler" <fiddler@roof.com> wrote
>
>>> 2. Two usual suspects that can keep your USB drive busy are System
>>> Restore and Indexing.

>
> Will Vista stop turning System Restore on every time I connect a USB drive?
>
> If it will, that's reason enough to move on from WinXP in my book.


Yes, is activates it on the system volume only. Indeed unbelievable
that this nonsense behaviour hasn't been fixed in five years.

Uwe



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 03-01-2007
Opinicus
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
"Uwe Sieber" <mail@uwe-sieber.de> wrote

>> Will Vista stop turning System Restore on every time I connect a USB
>> drive?
>> If it will, that's reason enough to move on from WinXP in my book.

> Yes, is activates it on the system volume only. Indeed unbelievable
> that this nonsense behaviour hasn't been fixed in five years.


Better late than never. Where do I sign up?

--
Bob
http://www.kanyak.com


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 03-01-2007
Roof Fiddler
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
"Roof Fiddler" <fiddler@roof.com> wrote in message
news:esV0zxwQHHA.1860@TK2MSFTNGP06.phx.gbl...
> But I don't know if this current service list is the same as it was
> yesterday when I was unable to safely remove the drive, and I can't test
> now because I'm using the drive. If I'm again unable to remove the drive
> the next time I try, I'll check the services again and post the list.


I just now tried to safely remove the drive again, and Vista is refusing, so
I performed the checks you suggested:
C:\>handle f:

Handle v3.2
Copyright (C) 1997-2006 Mark Russinovich
Sysinternals - www.sysinternals.com

System pid: 4 C58:
F:\$Extend\$RmMetadata\$TxfLog\$TxfLog.blf
System pid: 4 D3C: F:\$Extend\$RmMetadata\$Txf
System pid: 4 DE0:
F:\$Extend\$RmMetadata\$TxfLog\$TxfLogConta
iner00000000000000000001
System pid: 4 E04:
F:\$Extend\$RmMetadata\$TxfLog\$TxfLogConta
iner00000000000000000002
System pid: 4 EA4: F:\System Volume
Information\{3808876b-c176
-4e48-b7ae-04046e6cc752}
System pid: 4 EC0: F:\System Volume
Information\{4efbe3e4-aeb6
-11db-883c-005056c00008}{3808876b-c176-4e48-b7ae-04046e6cc752}
svchost.exe pid: 1084 920: F:\System Volume
Information\tracking.log
svchost.exe pid: 1084 934: F:\$Extend\$ObjId
svchost.exe pid: 1084 944: F:

C:\>tasklist /svc /fi "pid eq 1084"

Image Name PID Services
========================= ========
============================================
svchost.exe 1084 AudioEndpointBuilder, EMDMgmt, Irmon,
Netman, PcaSvc, SysMain,
TabletInputService, TrkWks, UxSms,
WdiSystemHost, Wlansvc, WPDBusEnum

C:\>sc qc AudioEndpointBuilder | find /i "display_name"
DISPLAY_NAME : Windows Audio Endpoint Builder

C:\>sc qc EMDMgmt | find /i "display_name"
DISPLAY_NAME : ReadyBoost

C:\>sc qc Irmon | find /i "display_name"
DISPLAY_NAME : Infrared monitor service

C:\>sc qc Netman | find /i "display_name"
DISPLAY_NAME : Network Connections

C:\>sc qc PcaSvc | find /i "display_name"
DISPLAY_NAME : Program Compatibility Assistant Service

C:\>sc qc SysMain | find /i "display_name"
DISPLAY_NAME : Superfetch

C:\>sc qc TabletInputService | find /i "display_name"
DISPLAY_NAME : Tablet PC Input Service

C:\>sc qc TrkWks | find /i "display_name"
DISPLAY_NAME : Distributed Link Tracking Client

C:\>sc qc UxSms | find /i "display_name"
DISPLAY_NAME : Desktop Window Manager Session Manager

C:\>sc qc WdiSystemHost | find /i "display_name"
DISPLAY_NAME : Diagnostic System Host

C:\>sc qc Wlansvc | find /i "display_name"
DISPLAY_NAME : WLAN AutoConfig

C:\>sc qc WPDBusEnum | find /i "display_name"
DISPLAY_NAME : Portable Device Enumerator Service

How do I find out which of those 12 services is the culprit?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 03-01-2007
Roof Fiddler
 

Posts: n/a
Re: Vista refuses to safely remove external usb hard drive
More info:
A file which I used earlier on F is foo.tc (a truecrypt volume). Before I
attempted to safely remove F, I of course dismounted foo.tc and shut down
truecrypt. "handle f:" as I showed in my previous post confirms that
truecrypt isn't accessing anything on F, and windows task manager's process
list confirms that truecrypt isn't running, and no other program on my
system uses .tc files, so nothing has any business accessing that file now.
But every time I try to safely remove F, Vista refuses and simultaneously
svchost.exe (PID 1084) begins reading f:\foo.tc at about 15MB/sec for
several minutes. It has NO BUSINESS doing that! As I mentioned before,
system restore is turned off (for all drives) and indexing is turned off for
F.
So one of the following services is reading f:\foo.tc for no good reason:
Windows Audio Endpoint Builder, ReadyBoost, Infrared monitor service,
Network Connections, Program Compatibility Assistant Service, Superfetch,
Tablet PC Input Service, Distributed Link Tracking Client, Desktop Window
Manager Session Manager, Diagnostic System Host, LAN AutoConfig, Portable
Device Enumerator Service.
How do I find out which one?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Unreadable External hard disk =?Utf-8?B?Z2F0ZTdjeQ==?= microsoft.public.windows.vista.general 10 03-01-2007 05:45
RE: External USB disk =?Utf-8?B?VUFO?= microsoft.public.windows.vista.general 5 03-01-2007 04:26
Problem with USB External Hard Disk Poh Tze Siang microsoft.public.windows.vista.general 1 03-01-2007 02:59
external drive.willit work with vista and =?Utf-8?B?Ym9iIDk4NzY=?= microsoft.public.windows.vista.general 7 02-28-2007 21:12
Can't access external USB drive AC [MVP MCMS] microsoft.public.windows.vista.general 7 02-28-2007 21:11




All times are GMT +1. The time now is 16:50.




Driver Scanner - Free Scan Now

Vistaheads.com is part of the Heads Network. See also XPHeads.com and Win7Heads.com.


Funny Commercials to make you laugh :-)

Design by Vjacheslav Trushkin for phpBBStyles.com.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119