<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>229501</bug_id>
          
          <creation_ts>2008-06-26 07:05 0000</creation_ts>
          <short_desc>sys-fs/mdadm init script function does not support partitionable raid arrays.</short_desc>
          <delta_ts>2008-06-28 16:44:38 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Library</component>
          <version>unspecified</version>
          <rep_platform>AMD64</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>smallnow@gmail.com</reporter>
          <assigned_to>base-system@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>smallnow@gmail.com</who>
            <bug_when>2008-06-26 07:05:06 0000</bug_when>
            <thetext>Since 2.6, the partitionable raid array feature changes the raid array naming convention and causes partitionable raid arrays to not get mounted. This is due to bug in init script function file. Specifically, the mknod command does not get handed the right minor device node. I have included a patch that fixes this. I fixed this on my system a few months ago but didn&apos;t have time to make a report. 

Hopefully this patch finds the maintainer of this file. The patch is for the latest unstable version but the changes work for all versions of the file. I noticed that in the most recent version, the mknod command is redirected to /dev/null. If I was using that version when I originally had this bug, I never would have found it. So, with this fix, hopefully there won&apos;t be errors from that command, but I removed the redirection because IT IS USEFULL to see the error.

See the section titled DEVICE NAMES in man mdadm to verify the correct device naming convention. Its a small section, heres the pertinent info: 

      The standard names for non-partitioned arrays (the only sort of md array available in 2.4 and earlier) are either of

              /dev/mdNN
              /dev/md/NN

       where NN is a number.  The standard names for partitionable arrays (as available from 2.6 onwards) are either of

              /dev/md/dNN
              /dev/md_dNN

       Partition numbers should be indicated by added &quot;pMM&quot; to these, thus &quot;/dev/md/d1p2&quot;.


Reproducible: Always

Steps to Reproduce:
1. do something like:
echo y\r | mdadm -C /dev/md_d3 -a p -c 128 -v -f -l 0 -n 3 /dev/sd[abc]7
2. make partitions. I have /dev/md_d3p1  /dev/md_d3p2
3. make a file system, reboot.
Actual Results:  
Big error when starting up. I did not save the error.


emerge --info for completeness.

Portage 2.2_rc1 (default-linux/amd64/2007.0/desktop, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.24-gentoo-r5 x86_64)
=================================================================
System uname: Linux-2.6.24-gentoo-r5-x86_64-Intel-R-_Core-TM-2_Quad_CPU_Q6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Tue, 24 Jun 2008 12:33:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.5.2-r4
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.5
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r2
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.4
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS=&quot;amd64 ~amd64&quot;
CBUILD=&quot;x86_64-pc-linux-gnu&quot;
CFLAGS=&quot;-march=native -O2 -pipe&quot;
CHOST=&quot;x86_64-pc-linux-gnu&quot;
CONFIG_PROTECT=&quot;/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb&quot;
CONFIG_PROTECT_MASK=&quot;/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d&quot;
CXXFLAGS=&quot;-march=native -O2 -pipe&quot;
DISTDIR=&quot;/usr/portage/distfiles&quot;
FEATURES=&quot;buildpkg distlocks metadata-transfer parallel-fetch preserve-libs sandbox sfperms strict unmerge-orphans userfetch&quot;
GENTOO_MIRRORS=&quot;http://gentoo.mirrors.easynews.com/linux/gentoo/&quot;
LANG=&quot;en_US.UTF-8&quot;
LDFLAGS=&quot;&quot;
LINGUAS=&quot;en_US&quot;
MAKEOPTS=&quot;-j6&quot;
PKGDIR=&quot;/usr/portage/packages&quot;
PORTAGE_RSYNC_OPTS=&quot;--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages&quot;
PORTAGE_TMPDIR=&quot;/var/tmp&quot;
PORTDIR=&quot;/usr/portage&quot;
SYNC=&quot;rsync://rsync.gentoo.org/gentoo-portage&quot;
USE=&quot;X aac acl acpi ads alsa amd64 arts artswrappersuid async automount bash-completion berkdb bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread eds emboss encode esd evo fam firefox flac fortran gdbm gif gpm gstreamer gtk hal iconv ipod ipv6 isdnlog java jpeg kde kerberos lcms ldap logitech-mouse lua mad midi mikmod mmx mmxext mp3 mpeg mudflap ncurses nls nptl nptlonly ogg opengl openmp oss pam pcre pdf perl png pppd python qt3 qt3support qt4 quicktime readline reflection samba sdl session spell spl sqlite sqlite3 sse sse2 ssl svg swat symlink tcpd tiff truetype unicode v4l v4l2 vim-syntax vorbis winbind x264 xcomposite xinerama xml xorg xprint xscreensaver xv xvid xvmc zlib&quot; ALSA_CARDS=&quot;ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x  ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3    trident usb-audio via82xx via82xx-modem ymfpci&quot; ALSA_PCM_PLUGINS=&quot;adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol&quot; APACHE2_MODULES=&quot;actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias&quot; ELIBC=&quot;glibc&quot; INPUT_DEVICES=&quot;evdev keyboard mouse vmmouse&quot; KERNEL=&quot;linux&quot; LCD_DEVICES=&quot;bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text&quot; LINGUAS=&quot;en_US&quot; USERLAND=&quot;GNU&quot; VIDEO_CARDS=&quot;vesa nvidia vmware i810&quot;
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>smallnow@gmail.com</who>
            <bug_when>2008-06-26 07:07:54 0000</bug_when>
            <thetext>Created an attachment (id=158475)
patch to fix the bug.

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>smallnow@gmail.com</who>
            <bug_when>2008-06-26 07:11:19 0000</bug_when>
            <thetext>Forgot 1 thing I think. The full path of the file in question:

/usr/portage/sys-fs/mdadm/files/raid-start.sh</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2008-06-28 16:44:38 0000</bug_when>
            <thetext>should be fixed with mdadm-2.6.4-r3 ... thanks for the report+fix

btw, you want [![:digit:]] rather than [^[:digit:]] ... the former is POSIX</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>158475</attachid>
            <date>2008-06-26 07:07 0000</date>
            <desc>patch to fix the bug.</desc>
            <filename>raid-start.sh-patch</filename>
            <type>text/plain</type>
            <data encoding="base64">KioqIHJhaWQtc3RhcnQuc2gtMi42LjQtcjIJMjAwNi0xMS0wOSAxNjozNjozNS4wMDAwMDAwMDAg
LTA4MDAKLS0tIHJhaWQtc3RhcnQuc2gJMjAwOC0wNi0yNSAyMzo1NjozMC4wMDAwMDAwMDAgLTA3
MDAKKioqKioqKioqKioqKioqCioqKiAxOSwyNiAqKioqCiAgCQlkaXI9JHtub2RlJS8qfQogIAkJ
W1sgISAtZCAke2Rpcn0gXV0gJiYgbWtkaXIgLXAgIiR7ZGlyfSIKICAKISAJCW1pbm9yPSR7bm9k
ZSMjKi99CiEgCQlta25vZCAiJHtub2RlfSIgYiAke01BSk9SfSAke21pbm9yIyMqbWR9ICY+IC9k
ZXYvbnVsbAogIAlkb25lCiAgfQogIAotLS0gMTksMjYgLS0tLQogIAkJZGlyPSR7bm9kZSUvKn0K
ICAJCVtbICEgLWQgJHtkaXJ9IF1dICYmIG1rZGlyIC1wICIke2Rpcn0iCiAgCiEgCQltaW5vcj0k
e25vZGUjIypbXls6ZGlnaXQ6XV19CiEgCQlta25vZCAiJHtub2RlfSIgYiAke01BSk9SfSAke21p
bm9yfQogIAlkb25lCiAgfQogIAo=
</data>        

          </attachment>
    </bug>

</bugzilla>