Opened 18 years ago

Closed 18 years ago

#17 closed defect (fixed)

/proc/mdstat parser bug

Reported by: roelof@… Owned by: Bruno Cornec
Priority: normal Milestone: 2.2.0
Component: mondo Version: 2.0.8
Severity: normal Keywords:
Cc:

Description

I think I found a bug in the mdstat raidlevel parser. For md0, the raidlevel is merged with the device name of the last raid member, resulting in an illegal 'raid1ed1' raidlevel name.

mondoarchive v2.0.8-666
RHEL4 rpm under CENTOS 4.3.
mdadm - v1.6.0 - 4 June 2004
kernel 2.6.9-34.0.2.ELsmp

[root@magrathea /]# cat /proc/mdstat
Personalities : [raid1] [raid5]
md1 : active raid1 hdi3[2] hdg3[1] hde3[0]
10008384 blocks [3/3] [UUU]

md2 : active raid5 hdi4[2] hdg4[1] hde4[0]
346570112 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]

md0 : active raid1 hdi1[2] hdg1[1] hde1[0]
10008384 blocks [3/3] [UUU]

unused devices: <none>

relevant part of mondo-archive.log:

running: parted2fdisk -l | grep -i raid > /tmp/mondo-run-prog-thing.tmp 2> /tmp/mondo-run-prog-thing.err
--------------------------------start of output-----------------------------
/dev/hde1 * 1 1246 10008463+ fd Linux raid autodetect
/dev/hde3 1497 2742 10008495 fd Linux raid autodetect
/dev/hde4 2743 24315 173285122+ fd Linux raid autodetect
/dev/hdg1 * 1 1246 10008463+ fd Linux raid autodetect
/dev/hdg3 1497 2742 10008495 fd Linux raid autodetect
/dev/hdg4 2743 24315 173285122+ fd Linux raid autodetect
/dev/hdi1 * 1 1246 10008463+ fd Linux raid autodetect
/dev/hdi3 1497 2742 10008495 fd Linux raid autodetect
/dev/hdi4 2743 24315 173285122+ fd Linux raid autodetect
--------------------------------end of output------------------------------
...ran just fine. :-)
You have RAID partitions but no /etc/raidtab - creating one from /proc/mdstat
[Main] libmondo-raid.c->parse_mdstat#1100: Unknown RAID level 'raid1ed1'.

Sorry, cannot read /proc/mdstat
Done.

Change History (5)

comment:1 by Bruno Cornec, 18 years ago

Status: newassigned

comment:2 by Bruno Cornec, 18 years ago

Milestone: 2.0.10

comment:3 by Bruno Cornec, 18 years ago

Could you check again with the version 2.0.9 of mond + 1.0.9 of mindi pleae ? This should have been corrected.

comment:4 by (none), 18 years ago

Hi Bruno,

Mindi now finishes ok resulting in a bootable CD image.

Below is the relevant part of /etc/log/mindi.log.

Thanks for the quick fix!

Roelof
******************************************
mindi v1.0.9-r780
i686 architecture detected
mindi called with the following arguments:

MINDI_LIB = /usr/lib/mindi
MINDI_SBIN = /usr/sbin
MINDI_CONF = /etc/mindi
MONDO_SHARE =
Found isolinux.bin at /usr/lib/syslinux/isolinux.bin
Mindi Linux mini-distro generator v1.0.9-r780
<snip>
....
<snip>
disk=1 siz=1302
disk=2 siz=1360
disk=3 siz=1390
disk=4 siz=1322
disk=5 siz=1304
Your raw fstab file looks like this:-
# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/md0                /                       ext3    defaults        1 1
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
/dev/md1                /home                   ext3    defaults        1 2
none                    /proc                   proc    defaults        0 0
/dev/md2                /srv                    ext3    defaults        1 2
none                    /sys                    sysfs   defaults        0 0
/dev/hdi2               swap                    swap    defaults        0 0
/dev/hdg2               swap                    swap    defaults        0 0
/dev/hde2               swap                    swap    defaults        0 0
/dev/hda                /media/cdrecorder       auto 
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
/dev/fd0                /media/floppy           auto 
pamconsole,fscontext=system_u:object_r:removable_t,exec,noauto,managed 0 0
Examining /dev/md0 (mount=/ fmt=ext3 psz=-1)
Examining /dev/md1 (mount=/home fmt=ext3 psz=-1)
Examining /dev/md2 (mount=/srv fmt=ext3 psz=-1)
------- /usr/sbin/parted2fdisk -l /dev/hdi2 log ------------
------- /usr/sbin/parted2fdisk log end ------------
Examining /dev/hdi2 (mount=swap fmt=swap psz=2008116)
------- /usr/sbin/parted2fdisk -l /dev/hdg2 log ------------
------- /usr/sbin/parted2fdisk log end ------------
Examining /dev/hdg2 (mount=swap fmt=swap psz=2008116)
------- /usr/sbin/parted2fdisk -l /dev/hde2 log ------------
------- /usr/sbin/parted2fdisk log end ------------
Examining /dev/hde2 (mount=swap fmt=swap psz=2008116)
/dev/md0 / ext3 -1
/dev/md1 /home ext3 -1
/dev/md2 /srv ext3 -1
/dev/hdi2 swap swap 2008116
/dev/hdg2 swap swap 2008116
/dev/hde2 swap swap 2008116




At 01:12 14/09/2006, you wrote:
>#17: /proc/mdstat parser bug
>-------------------------------------+--------------------------------------
>  Reporter:  roelof@users.berlios.de  |        Owner:  bruno
>      Type:  defect                   |       Status:  assigned
>  Priority:  normal                   |    Milestone:  2.2.0
>Component:  mondo                    |      Version:  2.0.8
>  Severity:  normal                   |   Resolution:
>  Keywords:                           |
>-------------------------------------+--------------------------------------
>Comment (by bruno):
>
>  Could you check again with the version 2.0.9 of mond + 1.0.9 of mindi
>  pleae ?
>  This should have been corrected.
>
>--
>Ticket URL: <http://trac.mondorescue.org/ticket/17>
>MondoRescue <http://www.mondorescue.org>
>GPL disaster recovery soluti

comment:5 by Bruno Cornec, 18 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.