Re: EVMS RAID 5 error...add 0 spares?

Steve Dobbelstein <[email protected]> Mon, 14 May 2007 17:50:22 -0500
Newsgroups gmane.linux.evms.devel
Message-ID <OF3FD99903.33533ECD-ON052572DB.0079EF3C-052572DB.007D765E@us.ibm.com>
"Scott Kaelin" <[email protected]> wrote on 05/14/2007 12:56:13 PM:

> On 5/14/07, [email protected] <[email protected]> wrote:
> >
> > Hello,
> >
> > Here is the output you requested:
> >
> >
> > -bash-3.00# cat /proc/mdstat
> > Personalities : [raid0] [raid1] [raid5] [raid10]
> > md0 : active raid5 dm-7[2] dm-6[1] dm-5[0]
> >       878882304 blocks level 5, 512k chunk, algorithm 0 [4/3] [UUU_]
>
> Those personalities worry me! Any reason you are using dm devices
> rather than raw disks? I noticed in your first post the device sdj,
> which is what evms was bombing on.

The DOS Segment Manager uses Device Mapper to create the devices for the
partitions it finds.  If you look at the DM tables for those devices you
should see that they map to the partitions on the disk.

I created a RAID5 array on my test machine.  my test machine has only one
disk available, so I created three partitions on it and RAIDed them
together.

stevend:~ # dmsetup ls
hdd3    (253, 2)
hdd2    (253, 1)
hdd1    (253, 0)
stevend:~ # dmsetup table hdd1
0 3969 linear 22:64 63
stevend:~ # dmsetup table hdd2
0 4032 linear 22:64 4032
stevend:~ # dmsetup table hdd3
0 4032 linear 22:64 8064
stevend:~ # ls -l /dev/hdd
brw-rw----  1 root disk 22, 64 2005-03-19 13:36 /dev/hdd

The fields for a linear mapping (a.k.a. target) are: mapping-start-offset
mapping-end-offset target-name device-major:device-minor offset-on-device.
For example, the DM device named "hdd1" is a linear mapping that provides
from offset 0 to offset 3969 for the device "hdd1", which maps the whole
device.  It is mapped to device 22:64 (hdd) at sector 63 (the partition
table on a disk takes up 63 sectors).

When you run "dmsetup ls" you should see that the DM devices have the names
of your segments.  The reason the names don't show up in /proc/mdstat is
that the md kernel code doesn't (can't?) get the name of the DM device.  It
just gets the minor number and reports the device as "dm-<minor-number>".

stevend:~ # cat /proc/mdstat
Personalities : [raid5]
md0 : active raid5 dm-2[2] dm-1[1] dm-0[0]
      3840 blocks level 5, 32k chunk, algorithm 2 [3/3] [UUU]

unused devices: <none>

Hope this helps.

Steve D.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

_______________________________________________
Evms-devel mailing list
[email protected]
To subscribe/unsubscribe, please visit:
https://lists.sourceforge.net/lists/listinfo/evms-devel