[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

RE: [K12OSN] Thanks...this is truly what the Open Source communityis all about



> From: Dan Young

> Yeah, is it just me or should /proc/mdstat give some sort of dire
> warning here?
>
> An underscore doesn't exactly scream "your RAID array is broke", given
> that's what it means in this context. Not quite as verbose as "lpX on
> fire". ;-)

Well the point of a raid is that you aren't really broken as long as
half is still there, but I agree that there should be some kind of
warning logged when the spare isn't working.  The 'smartmontools'
should probably get better press too.

Anyway if you want to play with hot-swaps, I've found this
procedure to work:

Save the result of 'fdisk -l' and 'cat /proc/mdstat' before
starting.

Hot-swap drives can be removed after giving the commands:
First deactivate the partition(s) from the raid devices
 mdadm /dev/mdxx -?fail /dev/sdxx (xx's are raid device/partition to mark failed)
 mdadm /dev/mdxx -?remove /dev/sdxx (same ? must not be active)
Repeat for all partitions if there are more than one.
Then 'logically' remove the drive
 echo "scsi remove-single-device 0 0 N 0">/proc/scsi/scsi
where the four numbers are;
controller (0 if you  only have one)
channel    (0 for most)
scsi id  (0,1,3,4,5,9 in IBM Netfinity hot-swap bay positions)
lun      (0 for most)
(give command before removing)
At this point you can physically remove the drive without
any complaints from the system.

A replacement drive can be added with:
echo "scsi add-single-device 0 0 N 0">/proc/scsi/scsi
(after installing the device - it should be detected as the
one just removed)
fdisk if needed to create partition(s)
  mdmadm /dev/mdxx ?add /dev/sdxx (partition to hotadd and rebuild)
cat /proc/mdstat to see rebuild progress and status

Mdadm is the more up to date replacement for the raidtools like
raidhotadd.

You can 'clone' a machine this way if you are careful to fix the
hostname and ip address of the machine receiving the loaded drives,
but you do have to be careful about mixing the drives up or putting
drives with non-matching raid sets in a machine and rebooting.  The
auto-detect/rebuild function seems to be easily confused.

---
   Les Mikesell
   les futuresource com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]