Hot Swapping a SATA drive in Windows 2000 and XP.

C

Chris S

SATA drives are theoretically hot swappable; the power and data
connectors are designed for 'hot' removal, with ground wires
connecting first, and the interface is designed to deal with the
various surge issues - this is well known.

I've used several USB 2.0 external drives, and before you remove them,
you are supposed to 'stop' them; presumably to flush any delayed
writes that may be in progress, etc.

But when I plug in a SATA drive, it does not show up as a device to be
'safely removed' in the 'Safely Remove Hardware' applet that shows up
if I plug in a USB device.

I've done some tests; when I plug in a SATA drive (a data drive,
obviously, not a boot drive), a new hard drive shows up, no problem.
I can read and write to this drive, no problem. And if I unplug it,
or power it down, the drive letter simply disappears - no error
messages or warnings whatsoever. All sounds good.

HOWEVER, I could not find a file that I had written to the drive.
This has all the markings of a write-cached file not being written to
the device. So it occurred to me that, somehow, I should be able to
'stop', or 'dismount', or otherwise 'software disconnect' this drive
before I actually remove it. But the only relevant option I can find
for the device is to disable write caching - is that what I should be
doing? I'd rather not do that as it will generally slow down
performance, but if it is the only way to guarantee data integrity,
that's what I'll do.

I've seen posts from others that indicate this is a regular practice,
so I just wondered, how do I guarantee my files have been 'flushed'
before removing the drive?

Thanks!
For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.
 
N

Nathan McNulty

You have a couple of options. First would be to format the drive as
FAT32, which you may or may not want to do. Second, you will need to
change the way the device is set up. Connect the device, open Device
Manager, double click on the hard drive in question, click the Policies
Tab, then set it to Optimize for Quick Removal. I use FAT32 on my
removeable SATA drives and set them to Optimize for Quick Removal, but
you may be able to do it differently.
 
C

Chris S

Thanks Nathan. Is the setting of FAT32 a pre-condition to getting the
'Optimize for Quick Removal', or am I formatting as FAT32 for another
reason? I don't believe I have any compelling reason to go with NTFS
with these particular drives so if that's the trick, I'll certainly go
with it.

I just popped in a USB memory stick, and went to the 'policies' tab,
and the two choices/explanations are as follows:
1) "Optimize for Quick Removal - This setting disables write caching
on the disk and in Windows, so you can disconnect this device without
using the Safe Removal icon"
2) "Optimize for performance - This setting enables write caching in
Windows to improve disk performance. To disconnect this device from
the computer, click the 'Safely Remove Hardware' icon in the taskbar
notification area".

So ... this suggests it's perfectly OK to go with either option, it's
just that, if you choose 'performance', you need to 'safely remove'
the device first. Is the very appearance of that 'safely remove
hardware' icon in the taskbar restricted to FAT32 devices?

I'll go home and play with this for a while and report back ...
thanks!





You have a couple of options. First would be to format the drive as
FAT32, which you may or may not want to do. Second, you will need to
change the way the device is set up. Connect the device, open Device
Manager, double click on the hard drive in question, click the Policies
Tab, then set it to Optimize for Quick Removal. I use FAT32 on my
removeable SATA drives and set them to Optimize for Quick Removal, but
you may be able to do it differently.

For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.
 
C

Chris S

Well, the plot thickens, as they say ... on my home system, when I
plug in my SATA drive, and go to it's properties (the same place where
I saw 'policies' on the USB drive below), I only see 'Disk Properties'
and 'SCSI Properties'. On the 'Disk Properties' tab, there is one
option - Write Cache enabled; it's grayed out and unchecked. On the
'SCSI Properties', there are two options: 'Disable tagged queueing'
and 'Disable synchronous transfers'. Both are available (i.e., not
grayed out), and bot are not checked.

So the bottom line is, I don't have the 'policies' tab in the first
place, which is where you are going to set the various optimization
choices. How come my SATA drives are being treated as 'SCSI', while
yours are not? Is that the root cause here?

My controller is an Adaptec 'SATA Connect' card, which shows up, under
device manager, as a SCSI device 'Adaptec Serial ATA 1205SA Host
Controller', and it's control panel applet says it's a Sil 3112 Rev 2
device.

Thanks!

Thanks Nathan. Is the setting of FAT32 a pre-condition to getting the
'Optimize for Quick Removal', or am I formatting as FAT32 for another
reason? I don't believe I have any compelling reason to go with NTFS
with these particular drives so if that's the trick, I'll certainly go
with it.

I just popped in a USB memory stick, and went to the 'policies' tab,
and the two choices/explanations are as follows:
1) "Optimize for Quick Removal - This setting disables write caching
on the disk and in Windows, so you can disconnect this device without
using the Safe Removal icon"
2) "Optimize for performance - This setting enables write caching in
Windows to improve disk performance. To disconnect this device from
the computer, click the 'Safely Remove Hardware' icon in the taskbar
notification area".

So ... this suggests it's perfectly OK to go with either option, it's
just that, if you choose 'performance', you need to 'safely remove'
the device first. Is the very appearance of that 'safely remove
hardware' icon in the taskbar restricted to FAT32 devices?

I'll go home and play with this for a while and report back ...
thanks!







For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.

===========
Remove 'nospam' from email to reply - Thanks
 
C

Chris S

And still more info ... I just plugged my SATA drive into my XP Pro
office computer (my home computer mentioned below is Windows 2000),
which has a Maxtor SATA/150 PCI Card (which is a promise device under
the covers). Going to the properties of the drive in this
configuration, I do see a 'policies' tab, but when I select it, the
two 'optimize...' options are grayed out, and the 'Optimize for
performance' is the option selected. So I can't change it to 'optimze
for quick removal' ....

Stranger and stranger ... ;)


Well, the plot thickens, as they say ... on my home system, when I
plug in my SATA drive, and go to it's properties (the same place where
I saw 'policies' on the USB drive below), I only see 'Disk Properties'
and 'SCSI Properties'. On the 'Disk Properties' tab, there is one
option - Write Cache enabled; it's grayed out and unchecked. On the
'SCSI Properties', there are two options: 'Disable tagged queueing'
and 'Disable synchronous transfers'. Both are available (i.e., not
grayed out), and bot are not checked.

So the bottom line is, I don't have the 'policies' tab in the first
place, which is where you are going to set the various optimization
choices. How come my SATA drives are being treated as 'SCSI', while
yours are not? Is that the root cause here?

My controller is an Adaptec 'SATA Connect' card, which shows up, under
device manager, as a SCSI device 'Adaptec Serial ATA 1205SA Host
Controller', and it's control panel applet says it's a Sil 3112 Rev 2
device.

Thanks!



===========
Remove 'nospam' from email to reply - Thanks

For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.
 
N

Nathan McNulty

I will try to help as best as I can. I believe you need to have the
drive formatted as FAT32 to use Optimize for Quick Removal. This is
simply what I choose to use for my SATA drive. I would update the
chipset drivers, format the drive again, and then set the options right
there. XP will not format FAT32 larger than 32GB unless you use
something different to format it. I simply connected the drive
internally and used a Windows 98 Bootdisk. Your method may vary ;)
 
C

Chris S

Well, I'm stumped. I just took an old 10 gig maxtor drive (ata) and
put it in my SATA enclosure (which does pata/sata conversion). The
drive shows up no problem. I formatted it as FAT32, but still, the
two 'optimize' options on the 'policies' button are grayed out.

This is somewhat consistent with my other tests, which have included
'native' SATA drives (though I can't afford to re-format the 'real'
sata drive at the moment).

I even took my USB memory stick, and was able to format it as NTFS,
and it still had the two 'optimize' options available on the
'policies' tab, so NTFS/FAT don't appear to be the deciding factor
here.

The essence of the problem seems to be that my two SATA cards (one
Adaptec/Silicon Image card, one Maxtor/Promise card) present
themselves as SCSI adapters, and thus, disks connected to them are
treated as SCSI disks.

Do your SATA adapters and associated drives show up as SCSI devices?

The only other variables I can think of are the specific settings in
the 'disk management' applet; I could make it 'basic' or 'dynamic'
(I've chosen both at various times, seems to make no difference),
primary or extended (think I've tried both);

I just spent $150 on a bunch of 6 foot external SATA cables, and
internal sata connector posts (to provide 'female' sata connectors on
back of computer) so I'd like to proceed with this, but at this point
I'm running out of ideas!

Thanks!

I will try to help as best as I can. I believe you need to have the
drive formatted as FAT32 to use Optimize for Quick Removal. This is
simply what I choose to use for my SATA drive. I would update the
chipset drivers, format the drive again, and then set the options right
there. XP will not format FAT32 larger than 32GB unless you use
something different to format it. I simply connected the drive
internally and used a Windows 98 Bootdisk. Your method may vary ;)

For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.
 
N

Nathan McNulty

Things showing up as SCSI is just odd. I have nothing like this on my
system. I would go into Device Manager (Start-Run-devmgmt.msc) and
remove these devices. Install the latest chipset drivers and reboot.
If after installing the latest chipset drivers and a clean configuration
of the drives it doesn't work, I would try a fresh install of XP as a
last resort if possible.
 
C

Chris S

OK, good - so SCSI is the clue here. The funny thing is ... I have
two computers at home and one at work that I'm setting up in this
manner, different mobo brands, different OSs, different SATA cards,
etc and they are all showing up with SCSI controllers.

So please tell me, Nathan: in device manager, on your system, where
DOES the SATA controller show up - what label, etc? Knowing that
would help!

At home, I have an Asus P4PE and an Asus P4B533, both with Win 2K.
Had 'latest' chipset drivers as of a year ago, but I'll check again.
One has a built-in Promise Fastrack SATA controller which I quit using
because it didn't pass SMART info.

At work, I have a Dell Dimension, very new (3.4 GHz), no idea about
chipset drivers but I'll see what I can download from dell. This is
Win XP Pro.

The home machines have the Adaptec/Silicon Image SATA card, and the
work machine has the Maxtor/Promise SATA card.

In device manager, the SATA cards show up under the heading of 'SCSI
and RAID controlllers' - on all three machines, two different OS's,
two SATA card brands!

So knowing what I 'should' see in device manager will give me
something to aim for!

Thanks!

Things showing up as SCSI is just odd. I have nothing like this on my
system. I would go into Device Manager (Start-Run-devmgmt.msc) and
remove these devices. Install the latest chipset drivers and reboot.
If after installing the latest chipset drivers and a clean configuration
of the drives it doesn't work, I would try a fresh install of XP as a
last resort if possible.

===========
Remove 'nospam' from email to reply - Thanks
 
N

Nathan McNulty

First, my SATA controller is onboard since I have an ASUS P4P800
Motherboard. I don't see anything listed as SATA or SCSI, but I do see
Intel(R) 82801EB Ultra ATA Storage Controllers and my drive is showing
under the second Primary IDE Channel. When I open the properties of the
drive for my internal, I am offered to uncheck Write Behind Caching, but
that is it. For my external, it offers whatever I want.

Try installing these chipset drivers and see if they help:
http://www.guru3d.com/newsitem.php?id=1671

You may have an old version of the drivers that don't fully support SATA
Storage. Also, you can try Intel Application Accelerator to make
changes to your drive instead of Windows. You can get that here:
ftp://aiedownload.intel.com/df-support/4857/eng/iaa23_enu.exe
 
C

Chris S

Well, it seems that 'add-in cards' are treated differently. In this
thread (http://www.techsupportforum.com/showthread.php?t=12439)
someone says '...Remember that Windows calls every add-on controller a
"SCSI" controller... it's an archaic leftover which will probably be
corrected someday.'

My Maxtor SATA/150 card installation manual says, in the section on
Confirm Driver Installation, "...Click Device Manager ... ; Click the
'+' in front of SCSI Controllers. 'WinXP Maxtor SATA/150 PCI Card'
should appear" - so clearly, they expect their driver to show up as a
SCSI device.

Given that the devices are treated as SCSI, it's somewhat logical that
their attached devices will be treated as SCSI too. So I don't think
I'm going to get far with my PCI Card SATA controllers (in terms of
removable storage), do you?!!

So I will see what I can do with my built-in promise controller; I
abandoned it because it didn't pass SMART info (which I need for
various reasons), but maybe with all the latest chipset drivers and
such, it will be usable and may show up as a non-SCSI device, and thus
allow me to better configure the 'removability' aspect.

But this still kinda blows my original strategy of having SATA cards
in all my computers, and using SATA drives the same way I currently
use USB2 drives - which really sucks!

First, my SATA controller is onboard since I have an ASUS P4P800
Motherboard. I don't see anything listed as SATA or SCSI, but I do see
Intel(R) 82801EB Ultra ATA Storage Controllers and my drive is showing
under the second Primary IDE Channel. When I open the properties of the
drive for my internal, I am offered to uncheck Write Behind Caching, but
that is it. For my external, it offers whatever I want.

Try installing these chipset drivers and see if they help:
http://www.guru3d.com/newsitem.php?id=1671

You may have an old version of the drivers that don't fully support SATA
Storage. Also, you can try Intel Application Accelerator to make
changes to your drive instead of Windows. You can get that here:
ftp://aiedownload.intel.com/df-support/4857/eng/iaa23_enu.exe

For email, send to chris at panties domain dot com, Remove panties and replace domain with attbi.
 
L

Len

Have been watching this thread for several days... just not sure what the
problem/question is? It is not XP (or any OS for that matter to my
knowledge) that designates add-on cards as SCSI but rather the system BIOS.

This has been the way of things since I can recall! On many motherboards to
this day if you choose to boot from a HD (IDE or SATA) which is attached to
an add-on controler you must choose "SCSI" as the boot drive option.

More modern MBs may have cleaned up the grammer but if the drive is not
running on the on-board IDE controler you can almost be assured that when
drive info is passed to the OS the drive has already been designated as
"SCSI".

BTW, drives attached to the built-in promise controller will most probably
be designated as "SCSI" as well.

FWIW,
Len
 
N

Nathan McNulty

And I have two PCI devices. A SoundBlaster 2 Audigy ZS Platinum and an
ATI eHome Wonder TV Tuner. All of my drives are connected onboard.
This is why I am having a difficulty figuring out what is going on :)
 
L

Len

Hi Nathan,

I think I read on one of these posts that you have the ASUS P4P800 - I have
the Deluxe version of the same board. If you have that version with the VIA
RAID controller and attach a drive to that controller it will be seen as a
SCSI drive.

The SATA on our board is controlled by the ICHR5 controller which is the
Primary IDE as well. Drives attached to that controller are not seen as
SCSI as they are operating on the same BUS and BIOS as the IDE drives. If
you connect SATA Raid I'm not 100% sure but believe that the RAID array will
also be seen as standard drives not SCSI. I do not have SATA RAID running
at this time.

FWIW, Len
 
C

Chris S

Just to clarify 'what the original issue is/was', as Len asked ... my
goal is to attach SATA drives to my system and use them as removable
storage in the same manner, conceptually, as I use my current USB2
extrernal drives - I want to be able to plug, and unplug, the drives
without rebooting the OS.

To do this, one has to worry about 'write caching', because hard
drives that are NOT designated as removable are typically going to
have their data cached. The various settings Nathan refers to
('optimize for quick removal', etc) on the 'policies' tab are for this
purpose. Well, with my SATA drives, attached to either an Adaptec
(Silicon Image chipset) or Maxtor (Promise chipset) sata PCI card, I
don't get those options enabled, even after formatting FAT32.

Further, I did several tests. I created a small file (test.txt) on
the SATA drive, then powered it down; windows XP did not complain;
drive letter disappeared happily; powered up; drive letter
re-appeared; file not there. Another test - I copied a folder with
333 files in it; verified the 333 files were there on the target (by
doing a 'properties' on the folder); powered down the disk; no
complaints by Windows; powered up the disk; only about 87 files were
on the disk.

I repeated the above tests, but this time, I shut down the system
'gracefully', and restarted. In this set of tests, the files/data
were all present.

The essence of the problem seems to be that I cannot control
write-caching with my external sata drives.

If I must, I will simply reboot my systems each time, but that really
blows my strategy of using SATA is a removable backup medium.

Thanks!

Hi Nathan,

I think I read on one of these posts that you have the ASUS P4P800 - I have
the Deluxe version of the same board. If you have that version with the VIA
RAID controller and attach a drive to that controller it will be seen as a
SCSI drive.

The SATA on our board is controlled by the ICHR5 controller which is the
Primary IDE as well. Drives attached to that controller are not seen as
SCSI as they are operating on the same BUS and BIOS as the IDE drives. If
you connect SATA Raid I'm not 100% sure but believe that the RAID array will
also be seen as standard drives not SCSI. I do not have SATA RAID running
at this time.

FWIW, Len

===========
Remove 'nospam' from email to reply - Thanks
 
N

Nathan McNulty

Instead of aiming for setting it as Optimize for Quick Removal, are you
able to simply uncheck Use Write Caching?
 
C

Chris S

No. In device manager, under 'Disk Drives', if I dbl-click the drive
in question, there are four tabs (this is on my Win2k system at home)
- General, Disk Properties, SCSI Properties, and Driver. On the 'Disk
Properties' tab, there is only one check box, and it is grayed out -
'Write cache enabled' (it's not selected either, though since it's
grayed out, that could mean nothing). On the 'SCSI Properties' tab, I
have two choices - Disable tagged queueing, and Disable synchronous
transfers. Neither are checked, but neither apply to write caching.
And that's it for options.

Thanks !

Instead of aiming for setting it as Optimize for Quick Removal, are you
able to simply uncheck Use Write Caching?

===========
Remove 'nospam' from email to reply - Thanks
 
N

Nathan McNulty

Dang. I don't know what to do with that SCSI part. I have no way to
test the scenerio though I do have Windows 2000 Workstation and Server
(any flavor) that I could throw on, it won't matter since I don't have a
PCI SATA Card :(

Have you tried a clean install of Windows and go from there? That would
be my last resort (and make a good ghost image of your current setup so
you can recover it if needed on top of backing everything up).
 
L

Len

Nathan,

As mentioned earlier if you have the P4P800 version with the VIA Raid
controller you can duplicate this scenario as a drive attached to that
controller will also be seen as a SCSI unit. I have found no method of
changing the write cache status for this drive.

As a side note the SATA drive installed on my system using the chipset-based
ICHR5 controller does have the option to turn on/off write cache available.

FWIW,
Len
 
B

Brian Taylor

I am in the exact same predicament. I have 3 low end hand built
servers where I am using a Promise S150 SX4 controller to run 4 bays
of a SuperMicro 5 bay hot swap backplane. Those 4 are working fine,
but the fifth bay was intended to be used for backup and is running
off an Addonics EI PCI host controller (based on the SI3112 SATA
controller).

When inserting a drive, the safe removal icon does not come up in the
systray, but when I remove the drive I get the "Unsafe Removal of
Device" dialog, and sometimes I get the "delayed write failed" dialog.
In Windows 2000 Server the "Disble Write Caching" box is unchecked
and grayed out. And under Windows 2003 Standard "Optimize for
Performance" is filled in and both settings a grayed out.

It was my hope that the people that will be swapping the hard drives
would not have to log in and mess around, but it looks like in order
to do that I am going to have to use something like FireWire external
enclosures for the drives. That is workable, but it costs more and I
already have foam lined cases for these drives with their hot swap
rails, and I really thought this was going to work.

If anyone has successfully done this please post with what OS,
controller, and driver you have used because it is driving me crazy.

Brian Taylor
 

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