Linux RAID management utilities?

Paul Lussier p.lussier at comcast.net
Tue Sep 25 23:13:27 EDT 2007


Bill McGonigle <bill at bfccomputing.com> writes:

> If it exists - kernel auto-assembly is fun for the lazy (I always get  
> burned if I try to get fancy with it, though).

Fancy like how?  I've been using kernel auto-assembly for years
without problems on raid sets with raid levels 0,1,3, and 5.

> Then there's the problem of mdadm.conf says it's UUID-12345... but I  
> have to go to /sys to get that

Huh ?  Any drive which is part of a raid set will tell you what the
UUID is.  The md device, if it's active will also tell you.

> Also, some information is only in fstab, like what gets mounted where.

Well, yeah, that's what the file system table is for.
I have to admit, I'm very confused about what you're asking for.
Your initial request was to provide you with something which, and I quote:

  "rebuild the raid arrays with missing members based on UUID",

mdadm is that tool.  So, what's fstab got to do with anything?  File
systems and md devices have little to do with each other.  There isn't
necessarilly a 1:1 correlation between a raid set and a file system.
It's entirely possible, and not entirely unreasonable to have one raid
set be part of another raid set (often called "plaiding") (though,
off-hand, I don't know if this is supported under mdadm...).

Also, mdadm.conf is seldom, if ever used in my experience.  Though it's
not a bad place to stash the information for future use.  The mdadm
man page even gives a decent example of how to discover all this:

   echo �DEVICE /dev/hd*[0-9] /dev/sd*[0-9]� > mdadm.conf
   mdadm --detail --scan >> mdadm.conf
or:
   echo �DEVICE /dev/hd[a-z] /dev/sd*[a-z]� > mdadm.conf
   mdadm  --examine  --scan --config=mdadm.conf >> mdadm.conf

To summarize, mdadm will allow you to:

 - assemble an already existing raid set
 - create a new raid set
 - query both drives and md devices about possibly existing raid sets.
 - start and stop raid sets
 - stop a raid set, replace a drive, and rebuild/restart a raid set.
 - monitor a raid set and send an alert if it notices a problem 
   (no program is sufficiently complete until send e-mail ;)

So, what is it you want to do that mdadm can't ?
-- 
Seeya,
Paul



More information about the gnhlug-discuss mailing list