I recently started playing with software RAID on my 2.2.13 system.  After
ditching a faulty scsi disk things were going swimmingly.  However, in
between some kernel compiles, I've managed to break the software raid
system...

I'm running 2.2.13 with devfs (although the problem also manifests itself 
if I disable devfs with the "devfs=nomount" kernel option).

The symptom is that attempts to use the md devices (e.g., via
raidstart) result in the error:

  /dev/md/0: Invalid argument

The raidtab is fairly simple:

raiddev /dev/md/0
  raid-level            0
  nr-raid-disks         2
  persistent-superblock 1
  chunk-size            4

  device                /dev/scsi/host1/bus0/target2/lun0/part1
  raid-disk             0

  device                /dev/scsi/host1/bus0/target3/lun0/part1
  raid-disk             1 

I've checked all the obvious reaons for this problem:

  # cat /proc/mdstat
  Personalities : [2 raid0]
  read_ahead not set
  md0 : inactive
  md1 : inactive
  md2 : inactive
  md3 : inactive

  # lsmod
  Module                  Size  Used by
  [...]
  raid0                   1760   0  (unused)

Running mkraid yields:

  DESTROYING the contents of /dev/md/0 in 5 seconds, Ctrl-C if unsure!
  handling MD device /dev/md/0
  analyzing super-block
  disk 0: /dev/scsi/host1/bus0/target2/lun0/part1, 4441941kB, raid superblock at 
4441856kB
  disk 1: /dev/scsi/host1/bus0/target3/lun0/part1, 4441941kB, raid superblock at 
4441856kB
  mkraid: aborted

I've even tried compiling the raid0 modules into the kernel, rather than as
a module, but with the same results.

Am I missing something *really* obvious here?  Or is there a way to extract
a more useful error message out of raidstart?  For what it's worth, an
strace shows raidstart failing on an ioctl:

  open("/dev/md/0", O_RDWR)               = 4
  ioctl(4, 0x931, 0x811)                  = -1 EINVAL (Invalid argument)

Thanks for your help,

  -- Lars

-- 
Lars Kellogg-Stedman <[EMAIL PROTECTED]> --> http://www.larsshack.org/

Reply via email to