  | |  rebuild arrays with mdadm checklist (WAS: Re: Less than kelpful
kernel disk me | rebuild arrays with mdadm checklist (WAS: Re: Less than kelpful
kernel disk me 2004-11-09 - By nathan r. hruby
Back On Sun, 7 Nov 2004, Rik van Riel wrote:
> On Sun, 7 Nov 2004, nathan r. hruby wrote:
>
> > Nov 7 04:38:02 xon kernel: Additional sense indicates Write error - recovered with auto reallocation
> > Nov 7 04:50:34 xon kernel: SCSI disk error : host 0 channel 0 id 1 lun 0 return code = 8000002
> > Nov 7 04:50:34 xon kernel: Current sd08:17: sense key Hardware Error
> > Nov 7 04:50:34 xon kernel: Additional sense indicates Defect list error
> > Nov 7 04:50:34 xon kernel: I/O error: dev 08:17, sector 1048616
>
> It 's dead, jim. Sorry.
>
>
Yeah figured. New disk arrived this morning.
Anyone want to peruse my run list for replacing the disk to make sure I 'm
not being extra-stupid again? Note these md 's were created by anaconda,
so there is no mdadm superblock on them, though /etc/raidtab is correct,
so I could use raidhot* if needed, though mdadm seems much simpler.
# Grab the partition map
sfdisk -d > sdb-parts.dump
# Remove the disk from all arrays, failing those that still marked as good
mdadm /dev/md0 -f /dev/sdb1 -r /dev/sdb1
mdadm /dev/md1 -r /dev/sdb6
mdadm /dev/md2 -f /dev/sdb3 -r /dev/sdb3
mdadm /dev/md3 -f /dev/sdb5 -r /dev/sdb5
mdadm /dev/md4 -r /dev/sdb7
mdadm /dev/md5 -r /dev/sdb8
## nrh: should I want for whatever reconstruction threads are started
## before proceeding?
# Turn off the swap from that partition
swapoff /dev/sdb2
# Tell the kernel to remove the disk
echo "scsi remove-single-device 0 0 1 0 " > /proc/scsi/scsi
# Physically remove the drive and replace with new one (yes, controller is
# hot swapable :)
# Tell kernel to add disk back
echo "scsi add-single-device 0 0 1 0 " > /proc/scsi/scsi
# Repartition new disk
sfdisk /dev/sdb < sdb-parts.dump
# Turn swap back on
swapon /dev/sdb2
# Readd the frive to the respective arrays
mdadm /dev/md0 -a /dev/sdb1
mdadm /dev/md1 -a /dev/sdb6
mdadm /dev/md2 -a /dev/sdb3
mdadm /dev/md3 -a /dev/sdb5
mdadm /dev/md4 -a /dev/sdb7
mdadm /dev/md5 -a /dev/sdb8
# Reboot just for good measure :)
shutdown -r now
Thanks!
-n
--
-- ---- ---- ---- ---- ---- ---- ---- -----
nathan hruby <nhruby@(protected) >
uga enterprise information technology services
production systems support
metaphysically wrinkle-free
-- ---- ---- ---- ---- ---- ---- ---- -----
--
Taroon-list mailing list
Taroon-list@(protected)
http://www.redhat.com/mailman/listinfo/taroon-list
|
|
 |