Idea to safely remove eSATA hard drives.

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
I connected a Thermaltake BlacX hard drive docking station to my Dell laptop using an eSATA cable. It works fine. However, I'm concerned about removing the hard drive from the docking station, or powering the docking station off while the laptop is still running Vista, in case there's still data in the write buffer that has not been flushed and written on the the hard drive. The problem is there is no "safely remove hardware" icon in the system tray by the clock at all.

I have an idea which I wanted to run by you gurus to get confirmation whether it will or won't work.

What if I write a small notepad file to the hard drive and then read it back? Wouldn't that force any data still in the write buffer to be written to the hard drive before the notepad data could be read back?

I'm thinking that regardless of how small the notepad file may be, it be the last data in the buffer and therefore force any previous data still in the buffer to be written before the notepad data can be written. So when I read the notepad data back, it would have effectively flushed the write buffer completely before the read back from the disk can occur.

What do you guys think? Will this idea be a way to safely remove the eSATA drive?

Thanks,
Sky
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
I have an idea which I wanted to run by you gurus to get confirmation whether it will or won't work.

What if I write a small notepad file to the hard drive and then read it back? Wouldn't that force any data still in the write buffer to be written to the hard drive before the notepad data could be read back?
That won't work. Trust me.

What you need is "Hotswap!", some Japanese programmer wrote it I think. It allows you to hotswap drives, when Windows won't let you.

http://mt-naka.com/hotswap/index_enu.htm
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
I have my eSATA HDD connected to a power box with switches. I have its policies set for quick removal - write caching is disabled. I switch it on and off as needed - never a problem.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Thanks for your insight and info. Just curious though, could you please explain why my idea won't work to flush the write buffer?

Thanks,
Sky
Because windows implements a write-back cache. When you write the file, it gets written to disk write buffers, and lazily written out, and when you re-open and read the file, it just reads the data out of the file cache, and doesn't even bother hitting the disk.

Study operating system design and computer science a little more, and you will understand why your idea wouldn't work.
 

Modelworks

Lifer
Feb 22, 2007
16,240
7
76
What you can do is execute a batch file using diskpart to take the drive offline before you remove it, then run the bat file again when you plug it back in to put the drive online.
Go to a command prompt and type "diskpart" , then "help" for the details.
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Because windows implements a write-back cache. When you write the file, it gets written to disk write buffers, and lazily written out, and when you re-open and read the file, it just reads the data out of the file cache, and doesn't even bother hitting the disk.

Study operating system design and computer science a little more, and you will understand why your idea wouldn't work.
Thanks for sharing your knowledge. What if I save a 50 MB test image twice (100 MB) and then read the second image back from the hard drive to display it? Would that insure that anything written previous to the test image saves would have been flushed to the hard drive? I don't care if the test images are not flushed.
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
What you can do is execute a batch file using diskpart to take the drive offline before you remove it, then run the bat file again when you plug it back in to put the drive online.
Go to a command prompt and type "diskpart" , then "help" for the details.
I've been googling and trying to figure out how to do that. Would the batch files look like this:

Script 1 to see the disk numbers: listdisk.txt
list disk
exit

Script 2 to set disk 1 offline: offline1.txt
sel disk 1
offline
exit

Script 3 to set disk 1 online: online1.txt
sel disk 1
online
exit


If the scripts are correct, is this the correct way to run them?

listdisk.bat contains:
diskpart /s listdisk.txt

offline1.bat contains:
diskpart /s offline1.txt

online1.bat contains:
diskpart /s online.txt

Thanks,
Sky
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
I have my eSATA HDD connected to a power box with switches. I have its policies set for quick removal - write caching is disabled. I switch it on and off as needed - never a problem.
Missed your post before. I was debating whether to disable write caching for the external drive in device manager but I didn't want to lose any performance, since that's why I'm using eSata instead of USB. Have you done any performance tests?

Thanks,
Sky
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
Since the drive is pureply for storage of data, photos, music, program data, etc., performance is not even an issue. I can only say I don't have to wait on it. It still beats USB 2 by about 4 times. <vbg>
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Hey, can you download and install the free version of HDTune, and tell me if you can read the "Health" status of a SATA HD in the eSATA dock? (SMART data?)

I can't seem to get that to work with my BlacX, with an eSATA cable. Everything else about the drive works fine.
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Since the drive is pureply for storage of data, photos, music, program data, etc., performance is not even an issue. I can only say I don't have to wait on

it. It still beats USB 2 by about 4 times. <vbg>
Corkyg, thanks for your feedback.

The reason why I want max speed on the external hard drives is for copying large files or folders to/from my internal hard drives. Also when doing backups of the internal drives in my laptop and desktop to the external hard drives. After the copy or backup process is complete, I want to be sure the write buffers are flushed completely before I remove the drive from the docking station and plug in a different drive.

Best regards,
Sky
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Hey, can you download and install the free version of HDTune, and tell me if you can read the "Health" status of a SATA HD in the eSATA dock? (SMART data?)

I can't seem to get that to work with my BlacX, with an eSATA cable. Everything else about the drive works fine.
Checked the HDTune website and apparently the free version is a trial version. Sorry but I don't want to install a free trial version and not be able to remove it completely and have remnants clogging my registry.

Again, sorry.
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
Checked the HDTune website and apparently the free version is a trial version. Sorry but I don't want to install a free trial version and not be able to remove it completely and have remnants clogging my registry.

Again, sorry.

No, it's not a trial version. Click on "Downloads", and then SCROLL DOWN. There's a second program there, that says "Free for personal use". Not "Free trial".

Use that one.

http://www.hdtune.com/files/hdtune_255.exe
 

AnitaPeterson

Diamond Member
Apr 24, 2001
5,978
474
126
Here's another vote for Hotswap!

I have that exact Thermaltake HDD dock, and I had to search for a solution as well. When I found Hotswap!, and verified that it worked, my concerns were over.

It simply works, nothing else required.
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Here's another vote for Hotswap!

I have that exact Thermaltake HDD dock, and I had to search for a solution as well. When I found Hotswap!, and verified that it worked, my concerns were over.

It simply works, nothing else required.
When I checked the hotswap link that VirtualLarry gave, it says:

"Supported Hardware and OS

Windows XP / Server 2003 / Vista / 7 / Server 2008 (32-bit and 64-bit) (11/16/2009 Updated!)
Silicon Image SATA Host Controller (SiI3112A, SiI3114, SiI3132, etc)
Silicon Image SATA-PATA (Parallel ATA) Bridge Controller (SiI3611)
SUNPLUS SATA-PATA Bridge Controller (SPIF3611)
SATA Host Controller (AHCI mode enabled in BIOS) (e.g. Intel Controller Hub (ICH), JMicron JMB363)
If Silicon Image controller is used, the driver will spin-down the drive upon device removable. "

And then it shows pictures of the plug in cards that it has been tested with. I don't have any of those cards. Is your hardware on the supported list?

How did you verify that it works?

My desktop PC has a P4C800E motherboard.
My laptop is a Dell Studio 1537 and I don't know what motherboard it uses.

Thanks,
Sky
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Hey, can you download and install the free version of HDTune, and tell me if you can read the "Health" status of a SATA HD in the eSATA dock? (SMART data?)

I can't seem to get that to work with my BlacX, with an eSATA cable. Everything else about the drive works fine.
I installed HD Tune 2.55 on my Vista laptop. I ran it and clicked the Health tab and it showed statistics for the laptop's internal HDD. I then selected the external drive in my BlacX and the health screen is blank.

Should I have clicked something else to see the health data?

Sky
 

VirtualLarry

No Lifer
Aug 25, 2001
56,570
10,202
126
I installed HD Tune 2.55 on my Vista laptop. I ran it and clicked the Health tab and it showed statistics for the laptop's internal HDD. I then selected the external drive in my BlacX and the health screen is blank.

Should I have clicked something else to see the health data?

Sky

Nope, that's what happens to me. It appears that the BlacX is actively interpreting the SATA commands, and is not passing through the SMART commands. Bummer.

Thanks.
 

acole1

Golden Member
Sep 28, 2005
1,543
0
0
When I checked the hotswap link that VirtualLarry gave, it says:

"Supported Hardware and OS

Windows XP / Server 2003 / Vista / 7 / Server 2008 (32-bit and 64-bit) (11/16/2009 Updated!)
Silicon Image SATA Host Controller (SiI3112A, SiI3114, SiI3132, etc)
Silicon Image SATA-PATA (Parallel ATA) Bridge Controller (SiI3611)
SUNPLUS SATA-PATA Bridge Controller (SPIF3611)
SATA Host Controller (AHCI mode enabled in BIOS) (e.g. Intel Controller Hub (ICH), JMicron JMB363)
If Silicon Image controller is used, the driver will spin-down the drive upon device removable. "

And then it shows pictures of the plug in cards that it has been tested with. I don't have any of those cards. Is your hardware on the supported list?

How did you verify that it works?

My desktop PC has a P4C800E motherboard.
My laptop is a Dell Studio 1537 and I don't know what motherboard it uses.

Thanks,
Sky

+1000 for Hotswap!

You *don't* have to use plug in cards to get it to work. I use it daily with 2 SATA drives in hot swap bays on a regular motherboard (forget the model) with an ICH10R controller. The software works *perfectly* and it is so simple and easy. You just have to make sure the controller on the motherboard supports AHCI. Here is a list: http://www.intel.com/support/chipsets/imsm/sb/CS-012304.htm
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
+1000 for Hotswap!

You *don't* have to use plug in cards to get it to work. I use it daily with 2 SATA drives in hot swap bays on a regular motherboard (forget the model) with an ICH10R controller. The software works *perfectly* and it is so simple and easy. You just have to make sure the controller on the motherboard supports AHCI. Here is a list: http://www.intel.com/support/chipsets/imsm/sb/CS-012304.htm
Acole1,

Thanks for that link. Now I need to find out whether either of my two PCs have chipsets on that list.

Sky
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Acole1,

Thanks for that link. Now I need to find out whether either of my two PCs have chipsets on that list.

Sky

My desktop with the P4C800E Deluxe mobo can't use Hotswap. It's running an ICH5 chipset. Dell 1537 laptop has a GM45 (Cantiga) chipset according to a post in another website, so I guess it can't use Hotswap either.

Darn Microsoft should have provided a safely remove function for Sata and eSata drives.

Sky
 

AnitaPeterson

Diamond Member
Apr 24, 2001
5,978
474
126
When I checked the hotswap link that VirtualLarry gave, it says:

"Supported Hardware and OS

Windows XP / Server 2003 / Vista / 7 / Server 2008 (32-bit and 64-bit) (11/16/2009 Updated!)
Silicon Image SATA Host Controller (SiI3112A, SiI3114, SiI3132, etc)
Silicon Image SATA-PATA (Parallel ATA) Bridge Controller (SiI3611)
SUNPLUS SATA-PATA Bridge Controller (SPIF3611)
SATA Host Controller (AHCI mode enabled in BIOS) (e.g. Intel Controller Hub (ICH), JMicron JMB363)
If Silicon Image controller is used, the driver will spin-down the drive upon device removable. "

And then it shows pictures of the plug in cards that it has been tested with. I don't have any of those cards. Is your hardware on the supported list?

How did you verify that it works?

My desktop PC has a P4C800E motherboard.
My laptop is a Dell Studio 1537 and I don't know what motherboard it uses.

Thanks,
Sky

Honestly, I have no idea what my exact hardware on the motherboard is... I'm running a SATA cable from a motherboard header to an eSATA bracket that came with another USB/eSATA HDD dock.

I'm at work now, but I'll check out my computer this afternoon, when I get home.
 

Skyzoomer

Senior member
Sep 27, 2007
385
14
81
Honestly, I have no idea what my exact hardware on the motherboard is... I'm running a SATA cable from a motherboard header to an eSATA bracket that came with another USB/eSATA HDD dock.

I'm at work now, but I'll check out my computer this afternoon, when I get home.
Thanks Anita but that won't be necessary since neither of my two PCs have a chipset that is listed as supported by Hotswap.

I appreciate your thoughtfulness though,
Sky
 

alkemyst

No Lifer
Feb 13, 2001
83,769
19
81
Checked the HDTune website and apparently the free version is a trial version. Sorry but I don't want to install a free trial version and not be able to remove it completely and have remnants clogging my registry.

Again, sorry.

Acronis makes a free SMART checker.