[NBLUG/talk] SATA hot swap?
gandalf at sonic.net
Thu Jun 1 17:36:44 PDT 2006
>> Anybody get this to work?
> 1. SATA hotswap chassis with pullout trays(cheapest ones are on eBay).
> 2. 3ware hardware RAID controller card.
> After deciding a drive is not recoverable, and the array is running
> degraded, pull out the old drive and put in the new one. Then do a rescan
> and then a rebuild.
> The 3ware controller is intelligent, so I have no idea how you would do it
> if you were not doing an array or using a smart controller.
Actually it's not part of a raid array. The drives purpose in life is to
be a backup. I'm using Vantec EZ Swap SATA Hotswap trays:
And I think I just figgured it out.
The big deal is to use:
echo "scsi remove-single-device 0 1 2 3" > /proc/scsi/scsi
echo "scsi add-single-device 0 1 2 3" > /proc/scsi/scsi
where 0 1 2 3 represent the scsi host, channel, device id and lun, (get
this out of /proc/scsi/scsi if unsure)
in my case the device in question is scsi3 with 0 for channel, id and lun
I was putting the values in the wrong order apparantly (bad google, bad).
Anyway I was just able to (unmunted) "scsi remove", remove the drive,
insert the drive, "scsi add" and mount the drive.
It's now responding nicely to e2fsck and rsync.
Does this script look ok to everyone?
echo "scsi add-single-device 3 0 0 0" > /proc/scsi/scsi
mount /dev/sdd1 /mnt/backup
rsync -axHv --del /home/* /mnt/backup
echo "scsi remove-single-device 3 0 0 0" > /proc/scsi/scsi
I put in the sleeps just to make sure, but their probably not nessicary.
More information about the talk