what I forgot to mention in my previous post: apart from my problem
bringing the scrambled drive back up, the array operated flawlessly in
degraded mode, all data unaffected.

>> mkpv.c: BLKGETSIZE undefined.
>> #include <linux/fs.h>

>i guess your system is not glibc based. Including Linux kernel headers
is
>now considered pretty unsafe.

I forgot that piece of system info. You�re right, it uses libc5. Seems
that BLKGETSIZE is not defined in <sys/mount.h> with libc5 (this might
need some kind of workaround for the beta/final raidtools).

>the kernel always stops all RAID arrays before rebooting.

ah, good to know!

>> badblocks -w /dev/hde1 (scrambling first raid5 disk with 0xaaaaaaaa)
>oops, this just destroyed the RAID superblock on that disk ...

Yes, I wanted reliably scramble the complete partition.

>because hde1 had no RAID info at all. If you use autostart then the
array
>will be started even in this case. raidstart should probably iterate
>through all listed drives in the raidtab, but i think it's better to
>conservatively say 'oops, abort'.

difficult to judge what�s best here. However scanning all drives for the
superblock might be somewhat better since it would behave exactly like
the kernel autodetect then. The preference of the first drive might
confuse some people (despite it�s documentation in raid5.howto).

>> The disk is marked as down in /proc/mdstat: _UUU
> it's a failed disk! You have just destroyed it's superblock.

Yes, I expected it to either stay down or automatically be recovered.
Since it stayed down, I just had no idea how to bring it back.

Haven given this a little more thought I suppose leaving a failed drive
down is always the better solution anyway, since the kernel cannot know
if it�s fully functional again, say: has been replaced.

>you can use raidhotremove/raidhotadd to add a new disk. (can be the
same
>'failed' disk in the simulation case)
>raidhotadd /dev/md0 /dev/hde1

just tried it, it gives:
/dev/md0: can not hot-add disk: invalid argument.

raidhotremove gives:
/dev/md0: can not hot-remove disk: disk not in array!

The drive is functional, however, I can partition and mke2fs it (raid
stopped).

>(there was one bug displayed in the logs, i've fixed this in my tree
already. a reboot would have fixed this bug, and it's nonfatal.)

I will reboot the machine as soon as it�s idle and try to hotadd the
drive again.
Stay tuned.

---
Thilo Herrmann, Rival Network GmbH
Phone: +49 89 82087-0, email: [EMAIL PROTECTED]
---

Reply via email to