A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Hardware and Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

"Ejecting" SATA drive (mass storage device, NOT USB) using script



 
 
Thread Tools Display Modes
  #1  
Old March 16th 06, 07:02 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using script

I have used many tools:

deveject
devcon
removedrive
sync

all seem to work with USB drives but will not work properly with Mass
storage devices of the hard drive kind (SATA) that isn't USB.

I know the Eject Devices GUI, but i want to run this through script.

Is there any way of achieving this, or has MS made windows inccappable of
doing so? (seems kinda silly to me)

Thanks you for all responses
Ads
  #2  
Old March 16th 06, 09:01 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using script

Perhaps it depends on the controler your sata drive is connected to.
I know if I connect a sata drive to one of my other sata controlers its then
detected as a removable device, with the resulting icon/stop device
available.
(My mobo has a Sil and Nvidea sata controller, it was the Nvidea controller
that then showed as removable)

"Jake1980" wrote in message
...
I have used many tools:

deveject
devcon
removedrive
sync

all seem to work with USB drives but will not work properly with Mass
storage devices of the hard drive kind (SATA) that isn't USB.

I know the Eject Devices GUI, but i want to run this through script.

Is there any way of achieving this, or has MS made windows inccappable of
doing so? (seems kinda silly to me)

Thanks you for all responses



  #3  
Old March 17th 06, 04:03 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using script

Jake1980 wrote:
I have used many tools:

deveject
devcon
removedrive
sync

all seem to work with USB drives but will not work properly with Mass
storage devices of the hard drive kind (SATA) that isn't USB.

I know the Eject Devices GUI, but i want to run this through script.


Does it mean that you can reattach it when it's removed
thru the 'save removal' GUI?

Have you tried a 'devcon rescan' after reattaching the
SATA drive?


Greetings from Germany

Uwe




  #4  
Old March 17th 06, 04:21 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

To answer DL: I think all SATA drives are considered removable to the OS.
That is the design spec of SATA.

Uwe Sieber: I have not used devcon rescan, i beleive what it does after i
attach it is that it shows up in the Manager but is unusable.

The computer needs a restart in order to use that volume. It doesn't get a
drive letter. It shoulds up in the GUI but i cannot use it.

All the tools i mentioned work with USB fine, it's with these removable mass
storage devices with SATA that all these utilities seem to "remove" it and
not "UNPLUG" it.

Only the Safely Remove Hardware GUI has the Eject feature that is required.

I need EJECT. Not REMOVE.

Devcon has a import/enable, but then what i'm doing is blocking the drive
and making it unusable; then reversing it. I still need to restart
afterwards to make the volume show up.

Thanks for all the responses.

Maybe this feature will be corrected in Vista?

The point would be to Truly do Hot Swap of Hard drives without a Raid array,
use JBODs and swap them like USB flash disks.

"Uwe Sieber" wrote:

Jake1980 wrote:
I have used many tools:

deveject
devcon
removedrive
sync

all seem to work with USB drives but will not work properly with Mass
storage devices of the hard drive kind (SATA) that isn't USB.

I know the Eject Devices GUI, but i want to run this through script.


Does it mean that you can reattach it when it's removed
thru the 'save removal' GUI?

Have you tried a 'devcon rescan' after reattaching the
SATA drive?


Greetings from Germany

Uwe





  #5  
Old March 18th 06, 11:33 AM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

They maybe considered removable but are only shown as such on certain
controllers.

"Jake1980" wrote in message
...
To answer DL: I think all SATA drives are considered removable to the OS.
That is the design spec of SATA.

Uwe Sieber: I have not used devcon rescan, i beleive what it does after i
attach it is that it shows up in the Manager but is unusable.

The computer needs a restart in order to use that volume. It doesn't get

a
drive letter. It shoulds up in the GUI but i cannot use it.

All the tools i mentioned work with USB fine, it's with these removable

mass
storage devices with SATA that all these utilities seem to "remove" it and
not "UNPLUG" it.

Only the Safely Remove Hardware GUI has the Eject feature that is

required.

I need EJECT. Not REMOVE.

Devcon has a import/enable, but then what i'm doing is blocking the drive
and making it unusable; then reversing it. I still need to restart
afterwards to make the volume show up.

Thanks for all the responses.

Maybe this feature will be corrected in Vista?

The point would be to Truly do Hot Swap of Hard drives without a Raid

array,
use JBODs and swap them like USB flash disks.

"Uwe Sieber" wrote:

Jake1980 wrote:
I have used many tools:

deveject
devcon
removedrive
sync

all seem to work with USB drives but will not work properly with Mass
storage devices of the hard drive kind (SATA) that isn't USB.

I know the Eject Devices GUI, but i want to run this through script.


Does it mean that you can reattach it when it's removed
thru the 'save removal' GUI?

Have you tried a 'devcon rescan' after reattaching the
SATA drive?


Greetings from Germany

Uwe







  #6  
Old March 19th 06, 06:33 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

Jake1980 wrote:

Only the Safely Remove Hardware GUI has the Eject feature that is required.

I need EJECT. Not REMOVE.


Don't pay to much attention to these terms...


I think I've found the problem. RemoveDrive removes the
volume only but not the drive itself.

When you execute RemoveDrive it shows the device name
that it ejects. But this is output is true only for
USB drives that are removable.

But you can grab the name and run RemoveDrive again
with this device name as parameter, e.g.

Removing Drive T:\ (FUJITSU MHK2120AT SATA Device)
success

then call
RemoveDrive "FUJITSU MHK2120AT SATA Device"

The problem here is, that there is no warrenty that
there is no second device with exactely the same
name. Then it's pure chance which one is logged of.

So far I've not found the missing link between volumes
on SATA drives and their drive. But I'm searching...


Greeting from Germany

Uwe
  #7  
Old March 20th 06, 08:17 AM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr


Uwe Sieber wrote:
Jake1980 wrote:


But you can grab the name and run RemoveDrive again
with this device name as parameter, e.g.

Removing Drive T:\ (FUJITSU MHK2120AT SATA Device)
success

then call
RemoveDrive "FUJITSU MHK2120AT SATA Device"


Correction: RemoveDrive constructs the device name
by putting together vendor name, device name and
the bus type name. The latter one I had guessed and
now it seems to be ok for USB only ('USB device').
There seems to be no bus type text for ATA or SATA
drives, so please try
RemoveDrive "FUJITSU MHK2120AT" even it shows
Removing Drive T:\ (FUJITSU MHK2120AT ATA device)
before.

Can someone tell me if SCSI and 1394 devices appear
with a trailing 'SCSI device'/'1394 device' or not
in the 'save removal' dialog? Thanks.


Greetings from Germany

Uwe

  #8  
Old March 20th 06, 04:19 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

Uwe:

thanks for your involvement in this.

using deveject, i have this data shown for my two hard drives:

'Maxtor 6 B300S0 SCSI Disk Device'
'SCSI\DISK&VEN_MAXTOR_6&PROD_B300S0&REV_ABCN\
5&38DB3D1E&0&000' [REMOVEABLE]

'Maxtor 6 B300S0 SCSI Disk Device'
'SCSI\DISK&VEN_MAXTOR_6&PROD_B300S0&REV_ABCN\
5&38DB3D1E&0&040' [REMOVEABLE]

First one is F: and the second one is G:

I would like to use the cmd line script to eject each one like every other 2
days.

testing with your program Removedrive.....

removedrive f: [Removes just the volume but not the drive. Restart is
needed to gain access again]

removedrive "Maxtor 6 B300S0 SCSI Disk Device" [Pickes out the first one
(F and actually shows it being ejected!!!! BUT since both disks are named
that way, i can't choose which one i want.]

this is getting closer, since both drives won't need to be in at the same
time ever, this script could be effiecent once tweaked and a process is done
to switch out the drives. Though it's not perfect, it's near close that
though.

Hopefully you can figure out if you can mix drive letter and name. or maybe
i can change the "name" to something else so that this program and
distinguish between the two.

Hope this helps!

Jake


"Uwe Sieber" wrote:


Uwe Sieber wrote:
Jake1980 wrote:


But you can grab the name and run RemoveDrive again
with this device name as parameter, e.g.

Removing Drive T:\ (FUJITSU MHK2120AT SATA Device)
success

then call
RemoveDrive "FUJITSU MHK2120AT SATA Device"


Correction: RemoveDrive constructs the device name
by putting together vendor name, device name and
the bus type name. The latter one I had guessed and
now it seems to be ok for USB only ('USB device').
There seems to be no bus type text for ATA or SATA
drives, so please try
RemoveDrive "FUJITSU MHK2120AT" even it shows
Removing Drive T:\ (FUJITSU MHK2120AT ATA device)
before.

Can someone tell me if SCSI and 1394 devices appear
with a trailing 'SCSI device'/'1394 device' or not
in the 'save removal' dialog? Thanks.


Greetings from Germany

Uwe


  #9  
Old March 20th 06, 05:23 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr


Jake1980 wrote:

testing with your program Removedrive.....

removedrive f: [Removes just the volume but not the drive. Restart is
needed to gain access again]

removedrive "Maxtor 6 B300S0 SCSI Disk Device" [Pickes out the first one
(F and actually shows it being ejected!!!! BUT since both disks are named
that way, i can't choose which one i want.]


Great, you have two identical named disks. You are the
perfect tester :-)
I think I've figured out how to match between volumes and
their disks...

Here is RemoveDrive 0.9:
http://www.uwe-sieber.de/files/removedrive09.zip

Please let me know if it works.


Greetings from Germany

Uwe
  #10  
Old March 20th 06, 05:53 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

Uwe:

Glad to help!

as for the link, it keeps giving me version 7, the url tries for 9 but
swtiches to 07 to download.

I will wait till later this afternoon, about 3 hours from this post and try
again to download it.

Thanks!

PS: I assume you want me to test just the drive removal by drive letter
since using the device name alwasy picks the first one, or drive F: ? Note:
these are two seperate disks, not two partitions on same hard drive.

"Uwe Sieber" wrote:


Jake1980 wrote:

testing with your program Removedrive.....

removedrive f: [Removes just the volume but not the drive. Restart is
needed to gain access again]

removedrive "Maxtor 6 B300S0 SCSI Disk Device" [Pickes out the first one
(F and actually shows it being ejected!!!! BUT since both disks are named
that way, i can't choose which one i want.]


Great, you have two identical named disks. You are the
perfect tester :-)
I think I've figured out how to match between volumes and
their disks...

Here is RemoveDrive 0.9:
http://www.uwe-sieber.de/files/removedrive09.zip

Please let me know if it works.


Greetings from Germany

Uwe

  #11  
Old March 20th 06, 09:08 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

as for the link, it keeps giving me version 7, the url tries for 9 but
swtiches to 07 to download.


I had uploaded it some minutes before my posting. Seems
you have cache proxy in between. Here is a copy that
the proxy cannot know...
http://www.uwe-sieber.de/files/removedrive09.zip


Uwe
  #12  
Old March 23rd 06, 03:33 PM posted to microsoft.public.windowsxp.hardware
external usenet poster
 
Posts: n/a
Default "Ejecting" SATA drive (mass storage device, NOT USB) using scr

Uwe:

I had ran the tool and it had successfully removed the drive [removedrive
G:], not just the partition, and changed the status on my SATA enclosure to
red, which means disconnected, as if i did the GUI Safely Remove Hardware.

But...

I took out the drive, and slide the drive back in. the drive initialized
and the device was added to the Device Manager. The volume was there in Disk
Management, but it was not reading the partition right. It was showing it
with NO drive letter, and showing 100% free, which it really is about 70%
full, thus show 30% free if it was reading right. There isn't a drive G:
obviously so a restart is neccessary. After a restart, everything is ok.

I think it's getting really close, but am unsure if there can be more to be
done.

This may work for us with a restart command at set intervals to makes sure
the other drive is there and working for that night, and just do a hop skip
and jump in the morning to switch drives.

OR there is that deveject command that could refresh the partitions so that
at a set interval the script would run, we would eject one drive and slide
the other drive in, then the deveject command script would run after. We'd
probably have to set it to set times... 9am remove drive, 9-10am swap HDs,
10am deveject refresh partition.

of course this still is a bit of work but it's far closer to what we wanted
than of when we started!

Thanks Uwe for your work, if you want to test anything else, let me know!

Hopefully they do something different with Vista.

Jake

"Uwe Sieber" wrote:

as for the link, it keeps giving me version 7, the url tries for 9 but
swtiches to 07 to download.


I had uploaded it some minutes before my posting. Seems
you have cache proxy in between. Here is a copy that
the proxy cannot know...
http://www.uwe-sieber.de/files/removedrive09.zip


Uwe

 




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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
eSATA support Techmanblues Hardware and Windows XP 9 December 9th 05 03:05 AM
USB Mass Storage Device - This device cannot start. (Code 10) lobo201 Hardware and Windows XP 11 November 26th 05 09:39 PM
Active screen/window timesout Johan New Users to Windows XP 1 August 28th 05 02:03 PM
WinXP won't recognize a SATA drive. Help Please! jmvcq Hardware and Windows XP 6 November 9th 04 02:47 PM
Clone Won't boot jimbo Hardware and Windows XP 10 November 2nd 04 03:36 PM






All times are GMT +1. The time now is 04:10 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.