SCIENTIFIC-LINUX-USERS Archives

September 2007

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Konstantin Olchanski <[log in to unmask]>
Reply To:
Konstantin Olchanski <[log in to unmask]>
Date:
Sat, 8 Sep 2007 22:12:57 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (26 lines)
On Sat, Sep 08, 2007 at 08:56:51AM -0700, Keith Lofstrom wrote:
> Are any of you running SATA drives?  Do you know whether they can be
> hotswapped in Linux, perhaps with some "hdparm" action before and
> after?

Yes, all SATA is hot-swappable on the hardware level. On the software
level, Linux SATA is "warm-plug" - you have to warn the system before
disconnecting disks and depending on your SATA driver, you have to
tell the system to look for newly attached disks.

In the nutshell, before disconnecting the disk you do this:
umount /dev/sdNNN
echo 1 > /sys/block/sdNNN/device/delete

After connecting the new disk:
watch /var/log/messages or /sys/block/sdNNN to see if Linux found the new device automatically
if not, "echo 0 0 0 > /sys/class/scsi_host/hostNNN/scan"
wait for Linux to find the new disk
mount /dev/sdNNN

-- 
Konstantin Olchanski
Data Acquisition Systems: The Bytes Must Flow!
Email: olchansk-at-triumf-dot-ca
Snail mail: 4004 Wesbrook Mall, TRIUMF, Vancouver, B.C., V6T 2A3, Canada

ATOM RSS1 RSS2