command line eject of AHCI eSata drive?

T

ToddAndMargo

Hi All,

Anyone know how to eject an AHCI eSata
drive from the command line? In other words, go
into the device manager and uninstall an eSata drive.

Many thanks,
-T
 
P

Pegasus [MVP]

ToddAndMargo said:
Hi All,

Anyone know how to eject an AHCI eSata
drive from the command line? In other words, go
into the device manager and uninstall an eSata drive.

Many thanks,
-T

"Uninstall" and "Eject" is not the same thing. If you mean "Eject" then
devcon.exe may do it for you. You can download it from here:
http://download.microsoft.com/download/1/1/f/11f7dd10-272d-4cd2-896f-9ce67f3e0240/devcon.exe.
It requires a small amount of scripting to make it work - post again if you
need more details.
 
T

ToddAndMargo

ToddAndMargo said:
Hi All,

Anyone know how to eject an AHCI eSata
drive from the command line? In other words, go
into the device manager and uninstall an eSata drive.

Many thanks,
-T

Okay. A little better description of what I want to do.
I really do want to "remove" from the "Device manager"

-T



Taken from :
http://web.archive.org/web/20080124124328/http://12.24.47.40/al/12/106/10744.htm

SATA: Hot Plugging Drives Under Windows 2000/XP

This feature is not explicitly highlighted in our current drivers, but
all SATA controllers from Silicon Image do support hot plug capability.
To remove a drive from a powered up system, do the following:

* Enter the Windows Device Manager (through Control Panel or right
clicking on My Computer and going to Properties)
* Go to Disk Drives and find the disk you want to remove
* Right click on the desired disk drive and select Remove/Disable

After performing this operation, you can remove the hard drive without
risk of losing any data that is currently stored in cache memory.

To plug in a new SATA drive in the array, you just need to plug in the
power and serial cables and Windows will automatically detect the new
HD. NOTE: If you are re-attaching a drive after a remove operation as
explained above, you must make sure that the HD is power cycled (power
cable unplugged) before re-attaching the HD serial data cable.
Comments/Special Instructions:

It is not recommended to perform these hot plug/unplug actions on
earlier versions of Windows such as Win9x or WinME since system lockups
can occur.
 
P

Pegasus [MVP]

ToddAndMargo said:
Okay. A little better description of what I want to do.
I really do want to "remove" from the "Device manager"

-T



Taken from :
http://web.archive.org/web/20080124124328/http://12.24.47.40/al/12/106/10744.htm

SATA: Hot Plugging Drives Under Windows 2000/XP

This feature is not explicitly highlighted in our current drivers, but all
SATA controllers from Silicon Image do support hot plug capability. To
remove a drive from a powered up system, do the following:

* Enter the Windows Device Manager (through Control Panel or right
clicking on My Computer and going to Properties)
* Go to Disk Drives and find the disk you want to remove
* Right click on the desired disk drive and select Remove/Disable

After performing this operation, you can remove the hard drive without
risk of losing any data that is currently stored in cache memory.

To plug in a new SATA drive in the array, you just need to plug in the
power and serial cables and Windows will automatically detect the new HD.
NOTE: If you are re-attaching a drive after a remove operation as
explained above, you must make sure that the HD is power cycled (power
cable unplugged) before re-attaching the HD serial data cable.
Comments/Special Instructions:

It is not recommended to perform these hot plug/unplug actions on earlier
versions of Windows such as Win9x or WinME since system lockups can occur.

Devcon.exe can disable a device. Whether this is sufficient for your purpose
I do not know.
 
A

Anna

ToddAndMargo said:
Hi All,

Anyone know how to eject an AHCI eSata
drive from the command line? In other words, go
into the device manager and uninstall an eSata drive.

Many thanks,
-T


T&M...
Just out of curiosity, have you run into any problem(s) simply disconnecting
an eSATA-connected HDD from your system(s) and that accounts why you're
seeking a way to uninstall the drive from Device Manager?

I ask the question because we routinely connect/disconnect eSATA HDDs from
our desktop systems and I can't recall a single instance of any problem
experienced re loss or corruption of data or any physical problem affecting
the disk/device as a result of simply disconnecting or powering-off the
device. And over the years (primarily with SATA-II HDDs) we've performed
these operations hundreds of times in a fairly wide variety of systems. I
suppose it goes without saying that we avoid disconnecting the device during
data transfer (disk-cloning operations or copying/moving massive amounts of
data).
Anna
 
T

ToddAndMargo

Anna said:
T&M...
Just out of curiosity, have you run into any problem(s) simply disconnecting
an eSATA-connected HDD from your system(s) and that accounts why you're
seeking a way to uninstall the drive from Device Manager?

I ask the question because we routinely connect/disconnect eSATA HDDs from
our desktop systems and I can't recall a single instance of any problem
experienced re loss or corruption of data or any physical problem affecting
the disk/device as a result of simply disconnecting or powering-off the
device. And over the years (primarily with SATA-II HDDs) we've performed
these operations hundreds of times in a fairly wide variety of systems. I
suppose it goes without saying that we avoid disconnecting the device during
data transfer (disk-cloning operations or copying/moving massive amounts of
data).
Anna

Hi Anna,

I think maybe you have a piece of software involved that
is dismounting your eSata drives for you, such as Backup
Assist. You may also have some setting that forces instant
writes to your drives (no delayed writes). Or maybe you
got really, really lucky.

In my research, I came across this:

http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm

I sits on your task bar just like your green arrow
(safely remove hardware), except it has a red arrow.
You should consider using this instead of just grabbing
and jerking (your luck may run out).

HTH,
-T
 
A

Anna

ToddAndMargo said:
Hi Anna,

I think maybe you have a piece of software involved that
is dismounting your eSata drives for you, such as Backup
Assist. You may also have some setting that forces instant
writes to your drives (no delayed writes). Or maybe you
got really, really lucky.

In my research, I came across this:

http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm

I sits on your task bar just like your green arrow
(safely remove hardware), except it has a red arrow.
You should consider using this instead of just grabbing
and jerking (your luck may run out).

HTH,
-T


T&M...
No, we do not use any software that "dismounts" a SATA or eSATA-connected
HDD when we disconnect the HDD from the system. As I indicated we simply
either power-off the external device or remove the signal (data) cable (SATA
or eSATA) from the machine. As simple as that.

We do not employ any special "setting" or exotic device/software in this
process. All I can tell you is that as I described above we have never run
into problems with this "process". At least as related to SATA-II HDDs. And
I'm aware of scores of other PC users whose experience parallels ours in
this regard.

I take it from your last post that you haven't personally encountered any
problems re this issue but that your research indicates a need from some
auxiliary software/device to avoid any problems in this area. Do I have this
right?
Anna
All I can do is relate our experiences
 
T

Tim Meddick

Pegasus,
In your first reply you stated:
"If you mean "Eject" then devcon.exe may do it for you. "

....I really approve of command-line tools, did you actually mean 'eject'
here or, in fact, 'disable' ?

If 'eject' then how is devcon.exe configured to do this?

==


Cheers, Tim Meddick, Peckham, London. :)
 
P

Pegasus [MVP]

Tim Meddick said:
Pegasus,
In your first reply you stated:


...I really approve of command-line tools, did you actually mean 'eject'
here or, in fact, 'disable' ?

If 'eject' then how is devcon.exe configured to do this?

I am guilty of using sloppy language in my first reply. There are utilities
to eject a device, e.g. a USB mass storage device, and there are utilities
to disable a device, e.g. an adapter. Devcon.exe can
install/remove/enable/disable devices. Thanks for pointing out the error of
my ways . . .
 
T

Tim Meddick

I genuinely did want it to be true.
I firmly believe there should be a command line equivalent to anything
[everything] you do in Windows.
But thanks for clarifying - I'd have been messing around with devcon's
"switches" for days on end otherwise.

==



Cheers, Tim Meddick, Peckham, London. :)
 
T

ToddAndMargo

Anna said:
T&M...
No, we do not use any software that "dismounts" a SATA or eSATA-connected
HDD when we disconnect the HDD from the system. As I indicated we simply
either power-off the external device or remove the signal (data) cable (SATA
or eSATA) from the machine. As simple as that.

We do not employ any special "setting" or exotic device/software in this
process. All I can tell you is that as I described above we have never run
into problems with this "process". At least as related to SATA-II HDDs. And
I'm aware of scores of other PC users whose experience parallels ours in
this regard.

I take it from your last post that you haven't personally encountered any
problems re this issue but that your research indicates a need from some
auxiliary software/device to avoid any problems in this area. Do I have this
right?
Anna
All I can do is relate our experiences

I took down an account firm at tax time.

From what you describe, you have gotten very, very lucky.
Take a look at
http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm
It may save your neck.

-T
 
T

ToddAndMargo

Tim said:
I genuinely did want it to be true.
I firmly believe there should be a command line equivalent to anything
[everything] you do in Windows.
But thanks for clarifying - I'd have been messing around with devcon's
"switches" for days on end otherwise.
Hi Tim,

Take a look at

http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm

It has a command line mode. It may do what you want.
Mouse over and right click on the red down arrow
and it will tell you how to operate it from the
command line.

-T
 
P

Pegasus [MVP]

Tim Meddick said:
I genuinely did want it to be true.
I firmly believe there should be a command line equivalent to anything
[everything] you do in Windows.
But thanks for clarifying - I'd have been messing around with devcon's
"switches" for days on end otherwise.

Cheers, Tim Meddick, Peckham, London. :)

You can do most things in Windows with console commands - if you can find
the right command! Devcon.exe is a strong candidate in this case, as is Uwe
Sieber's RemoveDrive.exe. However, since the OP has shown no interest in
following up these avenues we may never know. Suffice it to say that I am
using devcon.exe successfully on a daily basis.
 
T

Tim Meddick

T&M,
Thanks - Not exactly what I meant - as far as I know there's no
native Windows command line (like a RunDLL32 command) to EJECT a cd/dvd disk
out from the drive, rather than 'Safely Remove Hardware'...
However, I can now unplug my pen drive after issuing a simple command
without having to raise my head outside a Command Prompt, so I will be using
it.

==


Cheers, Tim Meddick, Peckham, London. :)


ToddAndMargo said:
Tim said:
I genuinely did want it to be true.
I firmly believe there should be a command line equivalent to anything
[everything] you do in Windows.
But thanks for clarifying - I'd have been messing around with devcon's
"switches" for days on end otherwise.
Hi Tim,

Take a look at

http://mysite.verizon.net/kaakoon/hotswap/index_enu.htm

It has a command line mode. It may do what you want.
Mouse over and right click on the red down arrow
and it will tell you how to operate it from the
command line.

-T
 
P

Pegasus [MVP]

Tim Meddick said:
T&M,
Thanks - Not exactly what I meant - as far as I know there's no
native Windows command line (like a RunDLL32 command) to EJECT a cd/dvd
disk out from the drive, rather than 'Safely Remove Hardware'...

Perhaps not native but there are several third-party programs that will do
it.
 
T

Tim Meddick

Any really small ones you know of that are completely command-line?

==


Cheers, Tim Meddick, Peckham, London. :)
 
T

ToddAndMargo

Pegasus said:
However, since the OP has shown no interest in
following up these avenues we may never know.

Dude! Give me some time to try them out. I won't
be out at that customer's site again till Thursday.

The game plan is to try out Drive Swap first, then Ume's
command, then devcon.

-T
 

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