Re: BSD disklabel and autodetection

2 messages, 2 authors, 2002-07-29 · open the first message on its own page

Re: BSD disklabel and autodetection

From: Neil Brown <hidden>
Date: 2002-07-29 10:13:18

On Monday July 29, mjt@tls.msk.ru wrote:
martin@hack.org wrote:
quoted
[]
quoted
following some hints i've seen elsewhere on the list i tried to pass md
parameters to the kernel ->

Booting on Nautilus using machine vector Nautilus from SRM
Command line: ro root=/dev/md1 md=1,/dev/sdb5,/dev/sdc2,/dev/sdd2 raid=noautodetect
md: Will configure md1 (super-block) from /dev/sdb5,/dev/sdc2,/dev/sdd2, below.

with the raid=noautodetect option it works.

what other raid/md options can be passed this way? and how do i configure
more than one device? geez, hope there's not a 256 char limit to the
command line...
You may use md=N,dev1,dev2,... option as many times as you want, i.e.

 linux root=... md,1=/dev/sda1,.. md=2,/dev/sda2,...

I think that it's sufficient to tell it about only ONE member of
an array this way if your raid device has persistent superblock
(kernel will read superblock from first disk (or second for that
matter - if you choose to tell it about second disk) and read
other devices from there).
Nope.  You have to list all component devices.  (Storing device
identification in the superblock is a bad idea that doesn't work in
general, but does in enough specific cases that people still seem to
like it).
About other options - there are only two, raid= (e.g. noautodetect)
and md= (above) that are raid-related.
quoted
are these options documented somewhere??
I personally looked at sources in drivers/md/ directory and got the
above line by reading initialization functions.  Maybe it's documented
somewhere in Documentation/... ;)
  Documentation/md.txt

Personally, I am not a big fan of autodetection at all.

I see two reasonable ways to start up the RAID array that
stores the root filesystem.

  1/ kernel parameters like:
                md=0,/dev/sda1,/dev/sdb1

  2/ use an initrd filesystem and a user-mode program that
    finds and assembles arrays based on a simple config file.

All non-root raid arrays should be assembled after boot by
a user-mode program.
I use and recommend mdadm
   http://www.cse.unsw.edu.au/~neilb/source/mdadm/

You can tell it how to recongnise parts of an array and 
it goes hunting, finds them, and assembles the array.

NeilBrown

md device stuck!

From: <hidden>
Date: 2002-07-29 15:50:05

hiya,

has anyone come across the problem of md devices getting 'stuck'?
currently, if i try to mount/umount md2, or run either raidstop or
mdadm --stop, the commands just hang and /proc/mdstat gives no indication
of anything going on. (the only way to kill the command seems to be to
SIGKILL its parent process...)

any ideas?

dope:~ # mount
/dev/md1 on / type ext2 (rw)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)

dope:~ # cat /proc/mdstat
Personalities : [raid1] [raid5]
read_ahead 1024 sectors
md2 : active raid5 sdb6[6] sdf1[5] sde1[4] sdd1[3] sdc1[2] sdb4[1] sda5[0]
      44220800 blocks level 5, 32k chunk, algorithm 2 [6/6] [UUUUUU]
md1 : active raid5 sdd2[2] sdc2[1] sdb5[0]
      17688448 blocks level 5, 32k chunk, algorithm 2 [3/3] [UUU]
md0 : active raid1 sdb2[1] sda2[0]
      2147264 blocks [2/2] [UU]
unused devices: <none>

dope:~ # ps -flw
  F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY          TIME CMD
004 S root      4414  4413  0  72   0 -   506 norita 15:33 pts/4    00:00:00 -bash
000 D root      4438  4414  0  72   0 -   220 ptrace 15:34 pts/4    00:00:00 mdadm --stop /dev/md2

many thanks,

/m
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help