LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   eSata-- hot-swappable?? (https://www.linuxquestions.org/questions/linux-hardware-18/esata-hot-swappable-679907/)

colbert 10-29-2008 09:59 PM

eSata-- hot-swappable??
 
I use a Sata drive in an external enclosure, connected to my box via eSata.

Now when I plug the drive in, it automounts itself just fine. I'm just wondering if I have to do sudo umount /media/drivefolder before I power down/unplug the enclosure, or can I just pull it out??

TIA :)

AuroraCA 10-29-2008 11:05 PM

Short answer is yes depending upon your kernel.

Source: Google "Linux hotplug"

See: http://linux-hotplug.sourceforge.net/

This article does not cover eSATA. From what I can tell it depends upon whether or not hotplug capabilities are built into the SATA controller hardware. This applies to Vista and Linux from what I've read.

What distribution and version of Linux are you using?

Generally if the controller supports AHCI it will support hot plug/swapping. Vista, MAC OS and Linux 2.6.19 and up support AHCI. Early controllers and operating systems supported SATA by emulating IDE devices which are not hot plugable.

colbert 10-29-2008 11:30 PM

AuroraCA,

Thanks, I am using Arch linux. My current kernel version is: 2.6.27.

I did some searching as well and apparently my mobo (P5K) uses a JMicron controller, which I do recall showing up first thing on boot and displaying my CD-rom (only IDE device I have) and also it showed my eSata enclosure when it was powered on at boot. Also read a post on another site that indicated the mobo controller needs to be in ACHI mode as opposed to IDE. I will switch it on reboot tomorrow and give it a shot.

Slokunshialgo 10-30-2008 12:06 AM

I'm probably horribly mistaken on this, but isn't eSATA designed to be hot-swappable in the specs? As for the umount I'd say it's generally a good idea to do either way, rather than straight yanking it out. Either do it from command line or GUI, it just makes sure nothing is being written to it, or using it at all, to avoid any corruption.

AuroraCA 10-30-2008 07:33 AM

Quote:

Originally Posted by Slokunshialgo (Post 3325786)
I'm probably horribly mistaken on this, but isn't eSATA designed to be hot-swappable in the specs? As for the umount I'd say it's generally a good idea to do either way, rather than straight yanking it out. Either do it from command line or GUI, it just makes sure nothing is being written to it, or using it at all, to avoid any corruption.

You are correct that the current specification for eSATA includes hot plug capabilities, however final specifications are not always complete before products are released to the public. Sometimes manufacturers don't implement all specs or as in early releases of SATA controllers they use a workaround such as IDE emulation to get the products out. The standards for eSATA exist but not all implementations are created equal.

I agree with you about unmounting devices in spite of the "specification". Better safe than sorry. I still don't like to just disconnect USB devices either.

estabroo 10-30-2008 08:49 AM

You should always umount it. Linux caches files in ram to speed up access. umount will cause the kernel to write out any unwritten pages that are still cached.

farslayer 10-30-2008 10:30 AM

I umounted a USB drive last night and had to wait literally 5 minutes (at least it seemed to take that long) for it to write out the cached file info to the Drive. it had cached my 150MB .iso image file rather than just writing it to the thumbdrive when I copied it.

So I agree, ALWAYS umount the drive before removal.

colbert 10-30-2008 12:47 PM

Right, I do right-click my little USB drives as they show up in Thunar and hit Unmount, waiting to pull them out. I will do the same with the eSata-- you guys are right, better safe than sorry!! :)


All times are GMT -5. The time now is 09:04 PM.