On Thu, Dec 05, 2002 at 09:12:15AM +0000 or so it is rumoured hereabouts,
John P. Looney thought:
> I got badly bitten yesterday because of my lack of knowledge of Linux
> RAID (and some assumptions that it would work like Solaris' Disksuite).
>> It took about two reboots before I copped on that raidstop wasn't
> persistant across reboots, like it is on solaris. Because the partition
> types were set to "RAID Autodetect", every boot it was making an md0, and
> even when I wasn't mounting it, it was syncing the two halves of the
> mirror. Worse yet, it didn't sync from "last mounted" to "other disk", it
> was always picking the corrupted disk, and syncing that to hda5, which I
> had mounted, read-write, as root.
>> Could someone with a bit more RAID knowledge than I have tell me what the
> "right way to do things" was ? I've a feeling it probably incorporates
> "Wait till both halves of the RAID mirror sync before you reboot" or some
> such...as you don't have to do this in Solaris, I didn't bother...and that
> could be what caused the massive corruption.
man raidtab says:
newly created RAID arrays should use a persistent
superblock. A persistent superblock is a small disk
area allocated at the end of each RAID device, this
helps the kernel to safely detect RAID devices even
if disks have been moved between SCSI controllers.
It can be used for RAID0/LINEAR arrays too, to pro
tect against accidental disk mixups. (the kernel
will either correctly reorder disks, or will refuse
to start up an array if something has happened to
any member disk. Of course for the 'fail-safe' RAID
variants (RAID1/RAID5) spares are activated if any
Every member disk/partition/device has a
superblock, which carries all information necessary
to start up the whole array. (for autodetection to
work all the 'member' RAID partitions should be
marked type 0xfd via fdisk) The superblock is not
visible in the final RAID array and cannot be
destroyed accidentally through usage of the md
device files, all RAID data content is available
for filesystem use.
I _think_ this is what caused your "wrong way" resync. zeroing the _end_
of /dev/hdd1 _should_ remove it whereupon it should get resynced correctly.
Of course, to do this safely, you'd need a raidstop first. To prevent the
automatic raid start at boot, create a "no raid" lilo entry. Hint:
mkinitrd --omit-raid-modules /boot/no-raid.img <kernel.version>
is your friend.
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
10:09am up 29 days, 18:53, 0 users, load average: 0.00, 0.00, 0.00
10:06am up 29 days, 18:44, 3 users, load average: 0.02, 0.02, 0.00
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!