Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 297753 - sys-fs/mdadm: raid5 with superblock version 1.1 is not recognized during booting
Summary: sys-fs/mdadm: raid5 with superblock version 1.1 is not recognized during booting
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-21 10:00 UTC by Juergen Rose
Modified: 2010-06-03 01:48 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
init-script to start md0 (raid5, metadata 1.1) (md0start,151 bytes, text/plain)
2010-01-16 13:46 UTC, Lorenz Kiefner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2009-12-21 10:00:16 UTC
I have raid5 (/dev/md3) with version 1.1 superblock:

Personalities : [raid1] [raid6] [raid5] [raid4] 
md3 : active raid5 sda2[0] sdc2[3] sdb2[1]
      340352000 blocks super 1.1 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
      
md1 : active raid1 hdc3[1] hda3[0]
      1011968 blocks [2/2] [UU]
...
root@grizzly:/boot(9)# mdadm --examine /dev/sda2
/dev/sda2:
          Magic : a92b4efc
        Version : 1.1
    Feature Map : 0x0
     Array UUID : b4e68642:1cf870e1:f60ad64d:daeef4e0
           Name : grizzly:3  (local to host grizzly)
  Creation Time : Mon Nov 30 11:15:52 2009
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 340352954 (162.29 GiB 174.26 GB)
     Array Size : 680704000 (324.58 GiB 348.52 GB)
  Used Dev Size : 340352000 (162.29 GiB 174.26 GB)
    Data Offset : 136 sectors
   Super Offset : 0 sectors
          State : clean
    Device UUID : 2d0f5d7e:911b65fd:882ac3b7:750d3091

    Update Time : Mon Dec 21 10:35:45 2009
       Checksum : 34600c3f - correct
         Events : 1081

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAA ('A' == active, '.' == missing)

And there is a entry for this array in /etc/mdadm.conf:
root@grizzly:/boot(13)# grep md/3 /etc/mdadm.conf 
ARRAY /dev/md/3 metadata=1.01 name=grizzly:3 UUID=b4e68642:1cf870e1:f60ad64d:daeef4e0

And I have mdadm and device-mapper in the boot runlevel:
root@grizzly:/boot(14)# ll /etc/runlevels/boot/mdadm 
lrwxrwxrwx 1 root root 17 Jan 11  2008 /etc/runlevels/boot/mdadm -> /etc/init.d/mdadm*
root@grizzly:/boot(15)# ll /etc/runlevels/boot/device-mapper 
lrwxrwxrwx 1 root root 25 Apr 16  2008 /etc/runlevels/boot/device-mapper -> /etc/init.d/device-mapper*

Nevertheless the raid /dev/md3 is not started during booting. I suppose, that the /lib64/rcscripts/addons/raid-start.sh is responsible for starting of raids.
If I call it manually, the raid /dev/md3 is started. But I can't see a "Starting up RAID devices" message during booting and I can't find any call to this script in the other init.d-scripts.

'dmesg' prints with respect to md3 only:
[    5.122900] md: Autodetecting RAID arrays.
[    5.225689] md: invalid raid superblock magic on sda2
[    5.227231] md: sda2 does not have a valid v0.90 superblock, not importing!
[    5.248470] md: invalid raid superblock magic on sdb2
[    5.250001] md: sdb2 does not have a valid v0.90 superblock, not importing!
[    5.276326] md: invalid raid superblock magic on sdc2
[    5.277863] md: sdc2 does not have a valid v0.90 superblock, not importing!

I suppose this is normal because my raid has v1.1 superblocks. 



Reproducible: Always
Comment 1 Juergen Rose 2009-12-21 10:01:44 UTC
Still a remark raid5 is part of the kernel:
root@grizzly:/usr/src/linux(11)# gzip -cd /proc/config.gz | grep RAID456
CONFIG_MD_RAID456=y
Comment 2 William Hubbs gentoo-dev 2009-12-21 22:51:47 UTC
Please post your emerge --info output as requested and re-open this bug.

Thanks,

William
Comment 3 Juergen Rose 2009-12-21 23:29:34 UTC
Sorry, that I forgot:
root@grizzly:/root(2)# emerge --info
Portage 2.1.7.15 (default/linux/amd64/10.0/desktop, gcc-4.4.2, glibc-2.11-r1, 2.6.32.1 x86_64)
=================================================================
System uname: Linux-2.6.32.1-x86_64-AMD_Athlon-tm-_64_Processor_3200+-with-gentoo-2.0.1
Timestamp of tree: Mon, 21 Dec 2009 03:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
ccache version 2.4 [disabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4, 3.1.1-r1
dev-python/pycrypto: 2.1.0
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.8.0
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.5.3
sys-apps/sandbox:    2.2
sys-devel/autoconf:  2.13, 2.64
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.3, 1.11.1
sys-devel/binutils:  2.20
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=k8"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=k8"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo ftp://ftp.easynet.nl/mirror/gentoo/ "
LDFLAGS="-Wl,-O1"
LINGUAS="de fr"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/zugaina /usr/local/portage/layman/dotnet /usr/local/portage/layman/science /usr/local/portage/layman/java-overlay /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X Xaw3d a52 aac acl acpi administrator afs alsa amd64 amrr ao aotuv apache2 asf aspell audacious audiofile automount bash-completion beagle berkdb bjam blas bluetooth boo boost branding bzip2 c++ cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli consolekit corba cracklib crypt cups curl cxx daap dbus device-mapper dga dia djvu doc dri ds2490 dts dv dvb dvd dvdr dvi dxr3 eds elf emacs emboss encode epiphany esd evo examples exif expat extra extras fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx fts3 fuse galago garmin gd gdal gdbm geolocation geos gif gimp ginac git glade glib glitz gml gmp gnokii gnome gnome-keyring gnuplot gnutls gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk guile hal hardened harness hddtemp hdf hdf5 hlapi http httpd iconv icq icu id3 ide imagemagick imap innodb ipod ipv6 irda ithreads jabber jadetex java java5 java6 jbig john jpeg jpeg2k kde kerberos kexi kpathsea ladspa lame lapack latex lcms ldap libffi libgda libnotify libsamplerate lirc lm_sensors lua lzo mad mail maildir mailwrapper math matroska mikmod mmx mmxext mng modules mono motif mozdevelop mozilla mp3 mp4 mpeg mpi mplayer mtp mudflap multilib musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networking networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs ntp numarray numeric obex objc ocaml octave odbc ogdi ogg ole openexr opengl openmp pae pam pcre pda pdf perl plotutils plugins png podcast policykit posix postgres postscript ppds pppd preview-latex proj projectx pstricks pulseaudio pymol python qhull qt3support qt4 quicktime readline reflection reiserfs rle romio rpc rrdcgi rrdtool samba sasl science sdl server session slang slp smbclient sndfile snmp soup sox speex spell spl sql sqlite sse sse2 ssl startup-notification stlport subtitles subversion suexec svg swig sysfs szip t1lib tcl tcpd tex tex4ht texmacs theora threads thunar thunderbird tidy tiff tk tntc tools truetype udev unicode usb userlocales utempter v4l2 virtualbox vorbis wav webdav webdav-serf webkit wmf wxwidgets x264 xattr xcb xemacs xext xine xml xmlreader xmlrpc xorg xpm xulrunner xv xvid xvmc zlib zvbi" ALSA_CARDS="AC'97" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" DVB_CARDS="tda10046 saa7134" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                evdev               " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" LIRC_DEVICES="hauppauge_dvb" NETBEANS_MODULES="ide websvccommon nb harness apisupport groovy gsf j2ee java xml" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 4 Juergen Rose 2010-01-04 07:47:38 UTC
Any news?

Maybe an additional information:

'mdadm -As' recognizes and assembles the array.
 
Comment 5 Lorenz Kiefner 2010-01-16 12:24:43 UTC
Same problem here.

dmesg output:
md: invalid raid superblock magic on sda2
md: sda2 does not have a valid v0.90 superblock, not importing!
md: invalid raid superblock magic on sdb2
md: sdb2 does not have a valid v0.90 superblock, not importing!
md: Scanned 4 and added 2 devices.

after "mdadm -A --scan" everything gets recognized and the RAID is up and running.

My Kernel is a 2.6.29-hardened.
Comment 6 Lorenz Kiefner 2010-01-16 13:46:04 UTC
Created attachment 216679 [details]
init-script to start md0 (raid5, metadata 1.1)

Add this to your runlevel "boot" to start md0 (edit to change)
Comment 7 Wormo (RETIRED) gentoo-dev 2010-01-18 02:54:20 UTC
Lorenz, thanks for posting your solution. Assigning to mdadm maintainers.
Comment 8 Nebojsa Trpkovic 2010-01-27 08:17:01 UTC
same problem here:

arrays made with live-cd (metadata v0.90) start without a problem, but arrays made with sys-fs/mdadm-3.1.1 (metadata v1.1) fail


Jan 27 08:52:48 titan kernel: md: Waiting for all devices to be available before autodetect
Jan 27 08:52:48 titan kernel: md: If you don't use raid, use raid=noautodetect
Jan 27 08:52:48 titan kernel: md: Autodetecting RAID arrays.
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sda3
Jan 27 08:52:48 titan kernel: md: sda3 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdb3
Jan 27 08:52:48 titan kernel: md: sdb3 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdc2
Jan 27 08:52:48 titan kernel: md: sdc2 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdd2
Jan 27 08:52:48 titan kernel: md: sdd2 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sde2
Jan 27 08:52:48 titan kernel: md: sde2 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdg1
Jan 27 08:52:48 titan kernel: md: sdg1 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdg3
Jan 27 08:52:48 titan kernel: md: sdg3 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdh1
Jan 27 08:52:48 titan kernel: md: sdh1 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: invalid raid superblock magic on sdh3
Jan 27 08:52:48 titan kernel: md: sdh3 does not have a valid v0.90 superblock, not importing!
Jan 27 08:52:48 titan kernel: md: Scanned 30 and added 21 devices.
Jan 27 08:52:48 titan kernel: md: autorun ...


emerge --info
Portage 2.1.7.16 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.32-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r2-x86_64-Intel-R-_Core-TM-2_Duo_CPU_E6550_@_2.33GHz-with-gentoo-1.12.13
Timestamp of tree: Wed, 27 Jan 2010 02:00:01 +0000
distcc 3.1 x86_64-pc-linux-gnu [disabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.9-r2
dev-lang/python:     2.6.4
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/ /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=core2 -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en sr sr@Latn ru"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="64bit a52 aac aalib acl acpi aio amd64 amr apache2 berkdb bzip2 cli cracklib crypt cups cxx dri dts dvb encode exif fam ffmpeg freetype gd gdbm geoip gif gpm httpd iconv imagemagick imlib iproute2 ithreads jabber jbig jpeg jpeg2k lm_sensors logrotate lzo mmx mmxext mod modules mp3 mpeg mudflap multilib multipath mysql ncurses nfs nls nptl nptlonly ogg openmp pam pcre perl php png pppd python readline reflection rle rrdtool samba session slang smp snmp spl sse sse2 ssl ssse3 stream sysfs tcpd theora threads tiff transcode truetype unicode usb vcd vorbis wmf xml xorg xvid zip zlib" ALSA_CARDS="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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sr sr@Latn ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 10 Nebojsa Trpkovic 2010-01-27 10:48:30 UTC
for me, problem is solved by changing partition tables:

I've left "raid" flag on on superblock 0.90 partitions (boot and root), but turned it off on partitions with superblock 1.x

this way kernel assembled boot and root array, but assembling of other arrays written in /etc/mdadm.conf is left for init process

("raid" flag in GPT partition table should be analog to "fd" partition type in MBR)
Comment 11 Philip L 2010-02-06 17:18:24 UTC
The reporter mentioned using the 'mdadm' init script, but that just runs the monitor daemon. The 'mdraid' init script actually assembles the arrays and requires an ARRAY entry for each array in /etc/mdadm.conf. These can be generated with mdadm --detail --scan after the arrays are assembled.
Comment 12 Steffen Schaumburg 2010-04-14 03:41:56 UTC
(In reply to comment #10)
> I've left "raid" flag on on superblock 0.90 partitions (boot and root), but
> turned it off on partitions with superblock 1.x
> 
> this way kernel assembled boot and root array, but assembling of other arrays
> written in /etc/mdadm.conf is left for init process
This works perfectly for me, thanks :)
I was getting this problem with gentoo-sources-2.6.33, baselayout-2.0.1 and mdadm-3.1.1-r1 with GPT and grub-1.98. I have four arrays, a metadata=0.90 RAID1 for /boot, a metadata=0.90 RAID5 for /, a metadata=1.1 RAID5 with LVM and a metadata=1.1 with RAID1. The 1.1 arrays don't get assembled automatically and the device nodes for them don't get created if the "raid" flag for their partitions is set.
What's the underlying problem here, does the kernel leave the arrays half-initialised or something like that? Does mdadm automatically (falsely) assume that the kernel auto-detects all arrays?
Is there any way I could check this? I only have videos and stuff on one of the 1.1 metadata arrays so I could easily test this.
Comment 13 SpanKY gentoo-dev 2010-06-03 01:48:22 UTC
the ebuilds issue a log message telling people to use the 'mdraid' init.d script