[lug] more on RAID0 on /

David Morris lists at morris-clan.net
Sun Nov 21 16:49:44 MST 2004


> I've been playing with a custom initrd but have been
> unsuccessful. The reason why is that I need a statically
> linked raidstart, which is next to impossible. The
> chicken-and-egg dilemma is: Since raidstart is in /sbin/,
> which in turn is on the md0 device, how the heck do I run
> raidstart to activate the root partition with /sbin/? If
> raidstart were statically linked then this wouldn't be a
> huge problem, I could for example put it in /boot/ or in
> the initrd, but a dynamically linked raidstart is not so
> easy to work with. Making a statically linked version
> available then making minor edits to linuxrc would do
> wonders.


The key is to include all those libraries which raidstart
requires.

Use the program 'ldd' to find out which libraries it
needs.  On my system for example, it ends up being thus:

	libpopt.so.0 => /lib/libpopt.so.0 (0x40019000)
	libc.so.6 => /lib/libc.so.6 (0x4001f000)
	/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

Also be certain your /etc/fstab file is setup properly with
/dev/md_ for all raid drives you use....if its wrong, this
will create no end of odd behavior.


On a sepperate note....

I haven't been able to find my detailed notes regarding raid
setups, but a few tidbits from my first attempt at it might
interest you.  Note that I talk about SILO because it was a
sparc box, but I believe all information is the same for
x86 and lilo...I cannot speak for grub as I've never had an
inclination to use it.


- Greg on linux-raid list says you can boot to RAIS-1 but
  NOT to RAID-5.
- Booting to a raid array is frequently possible by
  specifying the boot md option for the root partion such as
  "md=0,/dev/sda1,/dev/sdb1,/dev/sdd1,/dev/sde1"
  - If booting with 'md' does work, it can be added to
    SILO.conf by adding append="<md string>".
  - If the above does not work you must use initrd.
- /etc/fstab for the new root (in /dev/md1) must be
  correct....problems (such as /dev/md1 appearing as
  /dev/sdc1) appeared because of this.
- ALWAYS remember libraries when creating an initrd image!
  Run ldd on everything you include!
- When specifying an md=... line on the command line, the
  first number is the md device number, NOT the raid level!


Good luck!

--David




More information about the LUG mailing list