Skip to contentSkip to conversation

Partitionable raid array... How to create devices ?

DISCUSSION BERTRAND Joël 4 participants 6 messages Oct 16, 2007 MD RAID

lore
Share & tools
lore
#0 lore raw

Hello,

I use software raid for a long time without any trouble. Today, I have
to install a partitionable raid1 array over iSCSI. I have some questions because I don't understand how make this kind of array.

	I have a sparc64 (T1000) with a JBOD (U320 SCSI) that runs a 2.6.23 

linux kernel and debian testing distribution.

/dev/sda : internal SAS drive -> OS
/dev/sdb : internal SAS drive -> OS

I have made on /dev/sda and /dev/sdb seven raid1 volumes (non partitionables arrays).

/dev/sd[c-h] : external U320 drives. Each 300 GB drive only contains one "type fd" partition.

I have tried to create a partitionable array with :

Root gershwin:[/usr/src/linux-2.6.23] > mdadm -C /dev/mdp0 -l5 --auto=mdp4 -n6 /dev/sd[c-h]1

Root gershwin:[/dev] > ls -l md*

brw-rw---- 1 root disk  9,   0 Oct 15 10:29 md0
brw-rw---- 1 root disk  9,   1 Oct 15 10:29 md1
brw-rw---- 1 root disk  9, 127 Oct 16 09:59 md127
brw-rw---- 1 root disk  9,   2 Oct 15 10:29 md2
brw-rw---- 1 root disk  9,   3 Oct 15 10:29 md3
brw-rw---- 1 root disk  9,   4 Oct 15 10:29 md4
brw-rw---- 1 root disk  9,   5 Oct 15 10:29 md5
brw-rw---- 1 root disk  9,   6 Oct 15 10:29 md6
brw-rw---- 1 root disk  9,   7 Oct 15 10:29 md7
brw-rw---- 1 root disk  9,   8 Oct 15 10:29 md8

crw-rw---- 1 root root 10, 63 Oct 15 10:29 mdesc brw-rw---- 1 root disk 9, 127 Oct 16 10:03 mdp0

md:
total 0
brw-rw---- 1 root disk 9, 7 Oct 15 10:29 7
brw-rw---- 1 root disk 9, 8 Oct 15 10:29 8
Root gershwin:[/dev] > cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md127 : active raid5 sdh1[6] sdg1[4] sdf1[3] sde1[2] sdd1[1] sdc1[0]

      1464725760 blocks level 5, 64k chunk, algorithm 2 [6/5] [UUUUU_]
      [==>..................]  recovery = 12.6% (37043392/292945152) 

finish=127.5min speed=33440K/sec

md6 : active raid1 sda1[0] sdb1[1]

      7815552 blocks [2/2] [UU]

md5 : active raid1 sda8[0] sdb8[1]

      14538752 blocks [2/2] [UU]

md4 : active raid1 sda7[0] sdb7[1]

      4883648 blocks [2/2] [UU]

md3 : active raid1 sda6[0] sdb6[1]

      9767424 blocks [2/2] [UU]

md2 : active raid1 sda5[0] sdb5[1]

      29294400 blocks [2/2] [UU]

md1 : active raid1 sda2[0] sdb2[1]

      489856 blocks [2/2] [UU]

md0 : active raid1 sdb4[1] sda4[0]

      4883648 blocks [2/2] [UU]

unused devices: <none>
Root gershwin:[/dev] >

Well, /dev/mdp0 is created. But what's about /dev/mdp0p1 ? I believe
that mdadm has to create required devices. I don't understand where is my mistake. Any idea ?

Regards,

JKB

#1 lore raw

BERTRAND Joël said: (by the date of Tue, 16 Oct 2007 10:22:46 +0200)

Quoted 12 lines

Root gershwin:[/dev] > ls -l md*

brw-rw---- 1 root disk  9,   0 Oct 15 10:29 md0
brw-rw---- 1 root disk  9,   1 Oct 15 10:29 md1
brw-rw---- 1 root disk  9, 127 Oct 16 09:59 md127
brw-rw---- 1 root disk  9,   2 Oct 15 10:29 md2
brw-rw---- 1 root disk  9,   3 Oct 15 10:29 md3
brw-rw---- 1 root disk  9,   4 Oct 15 10:29 md4
brw-rw---- 1 root disk  9,   5 Oct 15 10:29 md5
brw-rw---- 1 root disk  9,   6 Oct 15 10:29 md6
brw-rw---- 1 root disk  9,   7 Oct 15 10:29 md7
brw-rw---- 1 root disk  9,   8 Oct 15 10:29 md8
Quoted 2 lines

crw-rw---- 1 root root 10, 63 Oct 15 10:29 mdesc
brw-rw---- 1 root disk 9, 127 Oct 16 10:03 mdp0

... crazy. Much better to create just /dev/md0 and use LVM

http://tldp.org/HOWTO/Software-RAID-HOWTO-11.html

Signature · 5 lines
Janek Kozicki                                                         |
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to BERTRAND Joël
Quoted 15 lines · On Tuesday October 16, [email protected] wrote:

Hello,

I use software raid for a long time without any trouble. Today, I have
to install a partitionable raid1 array over iSCSI. I have some questions because I don't understand how make this kind of array.

	I have a sparc64 (T1000) with a JBOD (U320 SCSI) that runs a 2.6.23 

linux kernel and debian testing distribution.

/dev/sda : internal SAS drive -> OS
/dev/sdb : internal SAS drive -> OS

I have made on /dev/sda and /dev/sdb seven raid1 volumes (non partitionables arrays).

Quoted 7 lines

/dev/sd[c-h] : external U320 drives. Each 300 GB drive only contains one "type fd" partition.

I have tried to create a partitionable array with :

Root gershwin:[/usr/src/linux-2.6.23] > mdadm -C /dev/mdp0 -l5 --auto=mdp4 -n6 /dev/sd[c-h]1

Try
/dev/md/d0
or
/dev/md_d0

as suggested in the "DEVICE NAMES" section of the man page. However what you used should work. I'll get that fixed for the next release.

Thanks for the report,
NeilBrown

#3 lore raw
Quoted 2 lines · On Tuesday October 16, [email protected] wrote:

However what you used should work. I'll get that fixed for the next release.

This is the patch that will fix it. I plan to release 2.6.4 late this week or early next.

NeilBrown

### Diffstat output

 ./mdopen.c |    1 +
 1 file changed, 1 insertion(+)
mdopen.c +1 -0
diff .prev/mdopen.c ./mdopen.c
@@ -161,6 +161,7 @@ int open_mddev(char *dev, int autof)
 				"not compatable with device named %s\n", dev);
 				return -1;
 			}
+			major_num = get_mdp_major();
 			break;
 		case 5: /* default to md if not standard */
 			break;
#4 lore raw
In reply to Neil Brown
Quoted 21 lines · Neil Brown
Quoted 11 lines · On Tuesday October 16, [email protected] wrote:

Hello,

I use software raid for a long time without any trouble. Today, I have
to install a partitionable raid1 array over iSCSI. I have some questions because I don't understand how make this kind of array.

	I have a sparc64 (T1000) with a JBOD (U320 SCSI) that runs a 2.6.23 

linux kernel and debian testing distribution.

/dev/sda : internal SAS drive -> OS
/dev/sdb : internal SAS drive -> OS

Quoted 8 lines

I have made on /dev/sda and /dev/sdb seven raid1 volumes (non partitionables arrays).

/dev/sd[c-h] : external U320 drives. Each 300 GB drive only contains one "type fd" partition.

I have tried to create a partitionable array with :

Root gershwin:[/usr/src/linux-2.6.23] > mdadm -C /dev/mdp0 -l5 --auto=mdp4 -n6 /dev/sd[c-h]1

Quoted 8 lines

Try
/dev/md/d0
or
/dev/md_d0

as suggested in the "DEVICE NAMES" section of the man page. However what you used should work. I'll get that fixed for the next release.

Thanks, it works now. I have seen this note, thus I have remaned my
array mdp0, but it was not enough ;-)

Regards,

JKB

#5 lore raw
In reply to BERTRAND Joël
Quoted 4 lines · BERTRAND Joël

Well, /dev/mdp0 is created. But what's about /dev/mdp0p1 ? I believe
that mdadm has to create required devices. I don't understand where is my mistake. Any idea ?

Two things come to my mind:

- udev messing up with what mdadm is doing (but this isn't the moment where the problems should show up). Either way, check them out to avoid subtle-looking problems.

- long time ago I noticed, that mdp parameter has problems with creating nodes for raid partitions on arrays with non-standard names. In my case it did work when explicit number of partitions was specified, but maybe your case is different. Try --auto=part4 or --auto=p4 - see if they work. For the reference :
http://marc.info/?l=linux-raid&m=118720367217616&w=2

-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html