The problem seems to be that mdadm wants an entry in mdadm.conf and the create command is the one that creates the entry - so it's a chicken and egg just like you mentioned below.
Here is what I did.
I used mknod to create a buffered file called /dev/md2 and then ran the command to creat the RAID10 array and voila it SEEMS to be working as evidenced by /proc/mdstat
[root@bigone13 ~]# mdadm --create --level=raid10 /dev/md2 --raid-devices=4 --spare-devices=1 /dev/sd[bcdef]1
mdadm: error opening /dev/md2: No such file or directory
[root@bigone13 ~]# ls /dev/md2
ls: /dev/md2: No such file or directory
[root@bigone13 ~]# ls /dev/md0
/dev/md0
[root@bigone13 ~]# ls /dev/md1
/dev/md1
[root@bigone13 ~]# file /dev/md1
/dev/md1: block special (9/1)<-------
[root@bigone13 ~]# file /dev/md0
/dev/md0: block special (9/0)<-------
[root@bigone13 ~]# mknod --help
Usage: mknod [OPTION]... NAME TYPE [MAJOR MINOR] Create the special file NAME of the given TYPE. -Z, --context=CONTEXT set security context (quoted string) Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask --help display this help and exit --version output version information and exit Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X, it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal; otherwise, as decimal. TYPE may be: b create a block (buffered) special file c, u create a character (unbuffered) special file p create a FIFO Report bugs to < bug-coreutils@gnu.org>.
[root@bigone13 ~]# mknod /dev/md2 b
mknod: missing operand after `b'
Special files require major and minor device numbers. These are the numbers in the parantheses above.
Try `mknod --help' for more information.
[root@bigone13 ~]# mknod /dev/md2 b 9 2
[root@bigone13 ~]# mdadm --create /dev/md2 --level=raid10 --raid-devices=4 --spare-devices=1 /dev/sd[bcdef]1
mdadm: array /dev/md2 started.
[root@bigone13 ~]# less /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid10 sdf1[4](S) sde1[3] sdd1[2] sdc1[1] sdb1[0]
286743936 blocks 64K chunks 2 near-copies [4/4] [UUUU]
[==>..................] resync = 12.2% (35209728/286743936) finish=28.6min speed=146344K/sec
Since all the component drives are set to type 0xfd Linux Raid we should be good.
Here is what I did.
I used mknod to create a buffered file called /dev/md2 and then ran the command to creat the RAID10 array and voila it SEEMS to be working as evidenced by /proc/mdstat
[root@bigone13 ~]# mdadm --create --level=raid10 /dev/md2 --raid-devices=4 --spare-devices=1 /dev/sd[bcdef]1
mdadm: error opening /dev/md2: No such file or directory
[root@bigone13 ~]# ls /dev/md2
ls: /dev/md2: No such file or directory
[root@bigone13 ~]# ls /dev/md0
/dev/md0
[root@bigone13 ~]# ls /dev/md1
/dev/md1
[root@bigone13 ~]# file /dev/md1
/dev/md1: block special (9/1)<-------
[root@bigone13 ~]# file /dev/md0
/dev/md0: block special (9/0)<-------
[root@bigone13 ~]# mknod --help
Usage: mknod [OPTION]... NAME TYPE [MAJOR MINOR] Create the special file NAME of the given TYPE. -Z, --context=CONTEXT set security context (quoted string) Mandatory arguments to long options are mandatory for short options too. -m, --mode=MODE set permission mode (as in chmod), not a=rw - umask --help display this help and exit --version output version information and exit Both MAJOR and MINOR must be specified when TYPE is b, c, or u, and they must be omitted when TYPE is p. If MAJOR or MINOR begins with 0x or 0X, it is interpreted as hexadecimal; otherwise, if it begins with 0, as octal; otherwise, as decimal. TYPE may be: b create a block (buffered) special file c, u create a character (unbuffered) special file p create a FIFO Report bugs to < bug-coreutils@gnu.org>.
[root@bigone13 ~]# mknod /dev/md2 b
mknod: missing operand after `b'
Special files require major and minor device numbers. These are the numbers in the parantheses above.
Try `mknod --help' for more information.
[root@bigone13 ~]# mknod /dev/md2 b 9 2
[root@bigone13 ~]# mdadm --create /dev/md2 --level=raid10 --raid-devices=4 --spare-devices=1 /dev/sd[bcdef]1
mdadm: array /dev/md2 started.
[root@bigone13 ~]# less /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4] [raid10]
md2 : active raid10 sdf1[4](S) sde1[3] sdd1[2] sdc1[1] sdb1[0]
286743936 blocks 64K chunks 2 near-copies [4/4] [UUUU]
[==>..................] resync = 12.2% (35209728/286743936) finish=28.6min speed=146344K/sec
Since all the component drives are set to type 0xfd Linux Raid we should be good.
No comments:
Post a Comment