SATA (hot) swapping for backup

David Abrahams dave at boost-consulting.com
Fri Aug 4 10:17:42 UTC 2006


Daniel Pittman <daniel at rimspace.net> writes:

> David Abrahams <dave at boost-consulting.com> writes:
>
>> I recently bought a pair of SATA drives on which to do weekly backups
>> of my server.  I also got a cool drive tray that allows me to pop the
>> disks in and out of the machine easily:
>> http://www.cooldrives.com/sata-serial-ata-mobile-rack-enclosure-lcd.html
>> You can remove the drive from the machine by turning a key -- which
>> powers it down -- and pulling on the handle.
>>
>> My problems: 
>>
>> 1. If I boot the server with no drive in the bay or with the drive
>>    power off, it is never detected, even after powering it on.  Is
>>    there a way to get that to work?
>
> What you need is the other side of SATA hot-swap: you bought the
> hardware, now you need the controller and kernel support to match.
>
> These pages discuss the issue in general, but the short answer is
> probably that your system will not (yet) support hot-swap SATA:
>
> http://linux-ata.org/software-status.html#hotplug
> http://linux-ata.org/driver-status.html#matrix

Okay, yeah, I found that page.

> Sadly, none of that seems completely clear about what kernel release is
> required for the various hot-plug and warm-plug options to work.  You
> may be forced to resort to asking the linux-kernel mailing list if
> someone else here can't chime in.

Also, none of that is clear about what, exactly, constitutes "support
for hot-swap" (which is connected with my next question).

>> 2. I'm not 100% sure that unmounting the drive, powering it off,
>>    removing it, and putting a new disk in its place is legit.  Can
>>    anyone confirm?  My motherboard *does* claim to support SATA
>>    hotswap, but I'm not sure if Linux supports it.
>
> Linux probably doesn't, save in the most recent kernels, and possibly
> only with appropriate patches.  

In my case I'm wondering what could possibly go wrong?  If the drive
is completely unmounted before it is powered down and removed, it
seems as though the OS has no reason to be concerned with how/when I
plug it in.  Any ideas?

>> Lastly, if there's any standard way to automate backup jobs (mounting
>> disks, rsync or whatever, unmounting, etc.) I'd appreciate a
>> reference.  I can always use cron scripts but I imagine someone has
>> probably come up with something better.
>
> udev can fire off arbitrary code on insertion of a device.  You can use
> that to trigger a script that will, basically, do all the work for you.

Is that really what "support for SATA hot-swap" amounts to?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the ubuntu-server mailing list