Unpluging external HDD backup drive.

F

Fokke Nauta

Nor have I, although I use safe removal if it works. I would be
interested to see if /anyone/ has ever had a problem pulling the plug
after allowing a suitable time for any relevant processes to stop. If
not, I wonder if this is one of those "just in case" issues, rather than
a real one?
I never had any problem with pulling the plug with an USB or external
hard drive. Important is that you are sure that all windows referring to
the external media are closed.

Fokke
 
W

Wolf K

On 26/02/2013 01:00, philo wrote: [...]
NO...I do not advise "just yanking it out"

Be safe and opt to safely remove drive.

Just hit the little "up" arrow on the right side of your task bar and
the "disconnect USB" icon will be there.

For the two seconds it takes to do it the right way...
you can save a lot of time if a CHKDSK /F is forced.
Well, you can yank it out, if you are sure all windows with refer to the
external media are closed.

Fokke
I've noticed that closing a window isn't always enough. Eg, I open a USB
stick from Explorer, look at some images, close the viewer, and find I
can't Eject the USB stick because it's still "in use." That's when I use
the Safely Remove Device applet.

I suspect this is somehow related to the difference between closing a
window and exiting the program, a bug that dates way, way back.

HTH
 
B

Bert

In Fokke Nauta
Important is that you are sure that all windows referring to
the external media are closed.
And what of background processes which don't have a GUI? And, just when
does Win 7 decide to flush its cache?

On Windows XP, you would either configure the drive for "quick removal,"
which disables write caching, or ALWAYS use the "Safely Remove Hardware"
icon in the notification area.

I'm assuming that Windows 7 has similar features. Otherwise, it's simply
too dangerous to use external drives with Windows 7.
 
F

Fokke Nauta

On 26/02/2013 01:00, philo wrote: [...]
NO...I do not advise "just yanking it out"

Be safe and opt to safely remove drive.

Just hit the little "up" arrow on the right side of your task bar and
the "disconnect USB" icon will be there.

For the two seconds it takes to do it the right way...
you can save a lot of time if a CHKDSK /F is forced.
Well, you can yank it out, if you are sure all windows with refer to the
external media are closed.

Fokke
I've noticed that closing a window isn't always enough. Eg, I open a USB
stick from Explorer, look at some images, close the viewer, and find I
can't Eject the USB stick because it's still "in use." That's when I use
the Safely Remove Device applet.

I suspect this is somehow related to the difference between closing a
window and exiting the program, a bug that dates way, way back.

HTH
Yanking out the USB stick when a viewer is still active won't hurt the
images on the USB stick. It's only a problem when you copy data onto the
USB stick. Then you should be really sure that all windows and
applications that refer to the USB stick are closed. If not, there is a
big change you would end up with the USB stick not containing the data
you copied.

Fokke
 
F

Fokke Nauta

Actually, a number of hardware standards support hot-plugging.
SATA is one of them. PS/2 (keyboard/mouse) is not.

http://en.wikipedia.org/wiki/Hot_swapping

SATA was specifically designed for server backplanes. You can
unplug a drive "hot" from a server backplane. The connector
has "advanced" pins, that make contact first, to ensure good
electrical conditions for the operation. The only tricky
part with SATA (or SAS), is spinning down the drive before
ejecting it from the enclosure. That's the part that makes
me nervous. You can actually "Safely Remove" SATA (the topic
of this thread) :) Doing a "Safely Remove", might even
provide an opportunity to issue park and spin-down commands.
The only drive you can't "Safely Remove", is the drive with
C: on it, because "the file system is busy".

The AHCI driver supports Hot Swap. Because I don't use AHCI
on my computers here, I never get to see that "Safely Remove"
icon for my hard drives.

http://en.wikipedia.org/wiki/Ahci

"AHCI is separate from the SATA 3 Gbit/s standard, although
it exposes SATA's advanced capabilities (such as
hot swapping and native command queuing) such that
host systems can utilize them."

Paul
Interesting stuff!

Fokke
 
F

Fokke Nauta

In Fokke Nauta


And what of background processes which don't have a GUI? And, just when
does Win 7 decide to flush its cache?

On Windows XP, you would either configure the drive for "quick removal,"
which disables write caching, or ALWAYS use the "Safely Remove Hardware"
icon in the notification area.

I'm assuming that Windows 7 has similar features. Otherwise, it's simply
too dangerous to use external drives with Windows 7.
Well, it's only a point when you have copied files to external media.
When you yank out the plug and windows are open or a process is still
busy with (one of) the files, you may loose this file or all. When you
are sure that all windows and applications referring to this external
medium are closed, there is no risk.
How long does W7 wait to write on an external medium?
Fully agree to use "quick removal" for external media in XP. Haven't got
a clue as to W7 has that feature. Must look into it.

When the files are already on the external media, there is no risk at all.

Fokke
 
F

Fokke Nauta

In Fokke Nauta


And what of background processes which don't have a GUI? And, just when
does Win 7 decide to flush its cache?

On Windows XP, you would either configure the drive for "quick removal,"
which disables write caching, or ALWAYS use the "Safely Remove Hardware"
icon in the notification area.

I'm assuming that Windows 7 has similar features. Otherwise, it's simply
too dangerous to use external drives with Windows 7.
Well, Boscoe says:

By default write caching is disabled for removable drives because
Microsoft knows that users are impatient and have a tendency to whip out
flash drives and memory cards willy-nilly, without properly ejecting
them first. You can check this is so by connecting your flash drive,
open Device Manager (Winkey + Break), right-click on its entry under
Disk Drives, select Properties and on the Policies tab ‘Optimise for
Quick removal’ or ‘Quick Removal’ should be selected
 
J

Jason

On Wed, 27 Feb 2013 07:57:08 +0000 "Jeff Layman"
I am not surprised by your and Jason's comments. That's why I
specifically stated "after allowing a suitable time for any relevant
processes to stop". Otherwise, there wouldn't be much difference
between having a file running from an external drive, and having
something running from an internal HD and the sata/Ide/whatever plug
being pulled from that.

Maybe we need a UPS for USB plug-ins. ;-)
It was literally hours between the end of the copy operation and when I
unplugged the drive. That seems like a decent interval to me, but noooo.
:-(

And I disagree with the remark by Steve: "If copying files, no problem."
That's only true if you have the drive set for rapid removal. I almost
always opt for Better Performance since the files I'm moving to the
external drive are usually huge. (Backups of 100's of GB, for example.)

Jason
 
J

Jason

I don't know about you, but I don't usually remove connectors from internal
drives when the machine is switched on and running.
Actually, a number of hardware standards support hot-plugging.
SATA is one of them. PS/2 (keyboard/mouse) is not.

http://en.wikipedia.org/wiki/Hot_swapping

SATA was specifically designed for server backplanes. You can
unplug a drive "hot" from a server backplane. The connector
has "advanced" pins, that make contact first, to ensure good
electrical conditions for the operation. The only tricky
part with SATA (or SAS), is spinning down the drive before
ejecting it from the enclosure. That's the part that makes
me nervous. You can actually "Safely Remove" SATA (the topic
of this thread) :) Doing a "Safely Remove", might even
provide an opportunity to issue park and spin-down commands.
The only drive you can't "Safely Remove", is the drive with
C: on it, because "the file system is busy".

The AHCI driver supports Hot Swap. Because I don't use AHCI
on my computers here, I never get to see that "Safely Remove"
icon for my hard drives.

http://en.wikipedia.org/wiki/Ahci

"AHCI is separate from the SATA 3 Gbit/s standard, although
it exposes SATA's advanced capabilities (such as
hot swapping and native command queuing) such that
host systems can utilize them."

Paul[/QUOTE]

Until I understood it better, I was -very- cautious about
unplugging external SATA drives. There is no Remove icon
showing when you plug one in, so I presumed hot-plug would
work. Then I learned for sure.
 
P

Paul

Jason said:
On Wed, 27 Feb 2013 07:57:08 +0000 "Jeff Layman"


It was literally hours between the end of the copy operation and when I
unplugged the drive. That seems like a decent interval to me, but noooo.
:-(

And I disagree with the remark by Steve: "If copying files, no problem."
That's only true if you have the drive set for rapid removal. I almost
always opt for Better Performance since the files I'm moving to the
external drive are usually huge. (Backups of 100's of GB, for example.)

Jason
If you *know* a cache is enabled, such as something labeled "better performance"
or words to that effect, you must use the Safely Remove.

Over the years, I've run into this many times. You'd think a cache
would be designed to "age out" and "drain" when time is available.
In practice, they don't work that way.

In the past, there were even problems at Windows shutdown, with
orderly cache flushing.

I would class this problem, in the "barely working" category,
instead of "robust, with the odd bug". And that's why I will
continue to use Safely Remove, no matter what I read in this
thread.

Also, caches can be added by things like driver software.
Things like the ancient Intel Applications Accelerator (IAA).
So even if you think you've got a handle on architecture,
there can always be a surprise hiding in there somewhere.
If you're working on a friend's computer that is around
ten years old, there might be a copy of that running
on the machine. You never know.

Paul
 
C

choro

Well, it's only a point when you have copied files to external media.
When you yank out the plug and windows are open or a process is still
busy with (one of) the files, you may loose this file or all. When you
are sure that all windows and applications referring to this external
medium are closed, there is no risk.
How long does W7 wait to write on an external medium?
Fully agree to use "quick removal" for external media in XP. Haven't got
a clue as to W7 has that feature. Must look into it.
Yes, it does have that feature. Choose between better performance in
which case there is more risk of losing everything on the external HD or
slower performance and more safety. I know I opted for better
performance but I've been thinking that that is not very wise after all.
I say, better safe than sorry!
 
S

Steve Hayes

And I disagree with the remark by Steve: "If copying files, no problem."
That's only true if you have the drive set for rapid removal. I almost
always opt for Better Performance since the files I'm moving to the
external drive are usually huge. (Backups of 100's of GB, for example.)
OK, I don't have cacheing enabled, partly to avoid that kind of problem.

Mt most frequent use of USB drives is to transfer my data files from my
desktop computer to my laptop, and back again, which I usually do at least
once a day, by batch file. And when the batch file has finished running, I
remove the flash drive, no problems.

But if I open a data file on a removable drive, I use the "safely remove"
thingy, because I have had problems with that.
 
M

Mike Barnes

Steve Hayes said:
Mt most frequent use of USB drives is to transfer my data files from my
desktop computer to my laptop, and back again, which I usually do at least
once a day, by batch file.
I know nothing of your circumstances, but that seems on the face of it
to be a very old-fashioned and inconvenient way of going about things.
Have you considered using a network connection?
 
S

Steve Hayes

I know nothing of your circumstances, but that seems on the face of it
to be a very old-fashioned and inconvenient way of going about things.
Have you considered using a network connection?
Much more difficult and inconvenient.

Getting an XP machine and a Win7 machine to see each other on the network is
hard enough. Modifying the batch file to copy the files over the network is
harder still. And by using two USB flash drives in rotation I have two extra
backup copies.

I do use Dropbox for some files, though.
 
C

Char Jackson

Much more difficult and inconvenient.

Getting an XP machine and a Win7 machine to see each other on the network is
hard enough. Modifying the batch file to copy the files over the network is
harder still. And by using two USB flash drives in rotation I have two extra
backup copies.

I do use Dropbox for some files, though.
Difficulty and convenience are in the eyes of the beholder. To me, the
network approach makes far more sense, but to each his/her own.
 
J

Jeff Layman

Why not just right click on the little USB icon in the lower right and
select the remove option? My understanding is that's just what that
function does, makes sure there is nothing writing to the USB device
and then says it's safe to remove the device....
That's the problem. It occasionally says the USB device cannot be
removed because something is still using it (if only it said /what/ was
still using it, but it's not Microsoft's way to be overly helpful with
error messages). But AFAICT nothing is using it. Even if I close
everything showing on the taskbar it still says something is using the
device. I can leave it an hour or more but there's no change in what
the USB icon says. That's when I pull the plug.
 
B

Buffalo

"Jeff Layman" wrote in message news:[email protected]...
That's the problem. It occasionally says the USB device cannot be removed
because something is still using it (if only it said /what/ was still using
it, but it's not Microsoft's way to be overly helpful with error messages).
But AFAICT nothing is using it. Even if I close everything showing on the
taskbar it still says something is using the device. I can leave it an
hour or more but there's no change in what the USB icon says. That's when
I pull the plug.
Sometimes when it says the USB device cannot be removed, I open up explorer,
click on that USB drive and then click on the C:\ drive and then it seems to
release that USB device.
 
P

Paul

Jeff said:
That's the problem. It occasionally says the USB device cannot be
removed because something is still using it (if only it said /what/ was
still using it, but it's not Microsoft's way to be overly helpful with
error messages). But AFAICT nothing is using it. Even if I close
everything showing on the taskbar it still says something is using the
device. I can leave it an hour or more but there's no change in what
the USB icon says. That's when I pull the plug.
What about Handle

http://technet.microsoft.com/en-us/sysinternals/bb896655

or Process Explorer ?

http://technet.microsoft.com/en-us/sysinternals/bb896653

"The display consists of two sub-windows. The top always shows a list
of the currently active processes and the names of their owning accounts.

The bottom window displays an additional information window based
on the mode that Process Explorer is in.

In handle mode, the bottom window displays the handles of process
selected in the top window. In DLL mode, the bottom window displays
the DLLs that the process has loaded. "

Process Explorer is supposed to duplicate the functionality
of Handle... if you can figure it out.

The File System is the arbitrator of partition unmounting,
and also keeps track of open handles to files. And that's the
API that Handle should be talking to. Since the files
could be owned by just about anybody, it's traditional
that functions like this require administrator privilege.
For "handle", a command line utility, that might mean using
an elevated command prompt window.

handle K:

The next time it happens, see what that says, and see if
it perhaps maps back to Explorer or something.

HTH,
Paul
 
J

Jeff Layman

"Jeff Layman" wrote in message news:[email protected]...
Sometimes when it says the USB device cannot be removed, I open up explorer,
click on that USB drive and then click on the C:\ drive and then it seems to
release that USB device.
Been there, done that. It works about 50% of the time. But there are
still some times it just does not work. I have no idea why it works
some times but not others (or why it should be necessary at all!).
 
J

Jeff Layman

Thanks for the link, but I have never heard of it. I had a look at the
page, but am not certain it would help. If it does find out what is
holding on to the USB drive, am I then supposed to use the -c switch?
Quote "Closes the specified handle (interpreted as a hexadecimal
number). You must specify the process by its PID. WARNING: Closing
handles can cause application or system instability.". Is that any
better than pulling the plug?!
or Process Explorer ?

http://technet.microsoft.com/en-us/sysinternals/bb896653

"The display consists of two sub-windows. The top always shows a list
of the currently active processes and the names of their owning accounts.

The bottom window displays an additional information window based
on the mode that Process Explorer is in.

In handle mode, the bottom window displays the handles of process
selected in the top window. In DLL mode, the bottom window displays
the DLLs that the process has loaded. "

Process Explorer is supposed to duplicate the functionality
of Handle... if you can figure it out.
Yes, it's not easy to use...
The File System is the arbitrator of partition unmounting,
and also keeps track of open handles to files. And that's the
API that Handle should be talking to. Since the files
could be owned by just about anybody, it's traditional
that functions like this require administrator privilege.
For "handle", a command line utility, that might mean using
an elevated command prompt window.

handle K:

The next time it happens, see what that says, and see if
it perhaps maps back to Explorer or something.
I have Process Explorer (an old version - Sysinternals updates more
frequently than Mozilla, and that's saying something!), but always
forget to try it. I think that the same argument as I used for
"Handles" applies - stopping a process with it might cause more problems
than just pulling the USB plug.
HTH,
Paul
Quite possibly. It has nudged my memory about using Process Explorer.
But this whole thread, and many others like it, continue to expose the
flaky nature of USB. It should just work without all these issues.

Or maybe it's not USB which is the problem. Anyone know if you get the
same difficulties with Linux or Mac?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top