[nSLUG] kernel setup stack overlaps lilo

bdavidso at supercity.ns.ca bdavidso at supercity.ns.ca
Mon Mar 15 22:31:23 AST 2004


On Sat, 13 Mar 2004, Donald Teed wrote:

> > see mdadm(8)).  Check it out, and free yourself from raidtab!
> I'm not about to mess with something that works and risk this.
> Its only a tiny file and I don't see any advantage to blowing it away.
> On the other hand there are some settings a person can make in the
> raidtab to specify a failed disk and hot spare, etc., so I
> could possibly make use of it in the future.

Sorry, I meant to reply to this sooner.  I see that I was bit confused
above, thinking that mdadm is part of the raidtools package, when it
actually replaces that package.

I didn't mean you should blow away the /etc/raidtab file, in fact it's a
handy reminder of how you constructed your RAID array.  Of course, so is
/proc/mdstat.  And you're right, it's a tiny file and copying it around
your network surely won't hurt anything.  It also won't do much of
anything.  A modern kernel will see and assemble your raid arrays long
before it mounts any filesystems, all the info the md driver needs is in
the persistent superblock.  That's how you can have / on a RAID array --
the kernel can't very well mount /dev/mdx on / if it needs to read
/etc/raidtab to assemble the array.

As for settings in /etc/raidtab for failed disks, hot spares, etc, the md
driver and mdadm(8) will do all that is needed.  Take this example from
the mdadm man page:

         mdadm /dev/md0 -f /dev/hda1 -r /dev/hda1 -a /dev/hda1
       will firstly mark /dev/hda1 as faulty in /dev/md0 and will
       then  remove  it from the array and finally add it back in
       as a spare.

And if you use mdadm --query (or --examine or --detail) you can see just
how much information is in that persistent superblock.

You really should look at it, it's a great tool and much more flexible
than mkraid, raidhotadd, etc.  It even lets you move spare drives among
arrays and define spare-groups that can share spares.

Bill Davidson
bdavidso at supercity.ns.ca

More information about the nSLUG mailing list