| Summary: | sys-fs/mdadm-3.2.3-r1 silently refuses to add drives to a degraded array. | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Nathan Caldwell <saintdev> |
| Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
3.2.6 is in the tree |
I have a degraded RAID10 array, where 1 device was not present on boot. If I attempt to add a new device to the array, mdadm 3.2.3 silently returns without adding the disk. $ sudo mdadm --version mdadm - v3.2.3 - 23rd December 2011 $ cat /proc/mdstat Personalities : [raid10] [raid6] [raid5] [raid4] [raid0] [raid1] [linear] md127 : active raid10 sda2[4] sdc2[5] sdb2[2] 1953513472 blocks super 1.2 512K chunks 2 far-copies [4/3] [_UUU] bitmap: 2/15 pages [8KB], 65536KB chunk unused devices: <none> $ sudo mdadm -D /dev/md127 /dev/md127: Version : 1.2 Creation Time : Mon Oct 31 20:38:12 2011 Raid Level : raid10 Array Size : 1953513472 (1863.02 GiB 2000.40 GB) Used Dev Size : 976756736 (931.51 GiB 1000.20 GB) Raid Devices : 4 Total Devices : 3 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Tue Jul 10 15:14:46 2012 State : active, degraded Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : far=2 Chunk Size : 512K Name : inti:gentoo (local to host inti) UUID : 03798d73:ad249212:5cbb8dd8:dc1241c9 Events : 682073 Number Major Minor RaidDevice State 0 0 0 0 removed 4 8 2 1 active sync /dev/sda2 2 8 18 2 active sync /dev/sdb2 5 8 34 3 active sync /dev/sdc2 $ sudo mdadm /dev/md127 --add /dev/sdd2 $ cat /proc/mdstat Personalities : [raid10] [raid6] [raid5] [raid4] [raid0] [raid1] [linear] md127 : active raid10 sda2[4] sdc2[5] sdb2[2] 1953513472 blocks super 1.2 512K chunks 2 far-copies [4/3] [_UUU] bitmap: 2/15 pages [8KB], 65536KB chunk unused devices: <none> $ sudo mdadm -D /dev/md127 /dev/md127: Version : 1.2 Creation Time : Mon Oct 31 20:38:12 2011 Raid Level : raid10 Array Size : 1953513472 (1863.02 GiB 2000.40 GB) Used Dev Size : 976756736 (931.51 GiB 1000.20 GB) Raid Devices : 4 Total Devices : 3 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Tue Jul 10 15:14:46 2012 State : active, degraded Active Devices : 3 Working Devices : 3 Failed Devices : 0 Spare Devices : 0 Layout : far=2 Chunk Size : 512K Name : inti:gentoo (local to host inti) UUID : 03798d73:ad249212:5cbb8dd8:dc1241c9 Events : 682073 Number Major Minor RaidDevice State 0 0 0 0 removed 4 8 2 1 active sync /dev/sda2 2 8 18 2 active sync /dev/sdb2 5 8 34 3 active sync /dev/sdc2 I upgraded to the (masked) mdadm 3.2.5 and adding a drive worked as expected. $ sudo mdadm /dev/md127 --add /dev/sdd2 mdadm: added /dev/sdd2 $ cat /proc/mdstat Personalities : [raid10] [raid6] [raid5] [raid4] [raid0] [raid1] [linear] md127 : active raid10 sdd2[6] sda2[4] sdc2[5] sdb2[2] 1953513472 blocks super 1.2 512K chunks 2 far-copies [4/3] [_UUU] [>....................] recovery = 0.0% (643584/976756736) finish=657.2min speed=24753K/sec bitmap: 2/15 pages [8KB], 65536KB chunk unused devices: <none> $ sudo mdadm -D /dev/md127 /dev/md127: Version : 1.2 Creation Time : Mon Oct 31 20:38:12 2011 Raid Level : raid10 Array Size : 1953513472 (1863.02 GiB 2000.40 GB) Used Dev Size : 976756736 (931.51 GiB 1000.20 GB) Raid Devices : 4 Total Devices : 4 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Tue Jul 10 15:19:30 2012 State : active, degraded, recovering Active Devices : 3 Working Devices : 4 Failed Devices : 0 Spare Devices : 1 Layout : far=2 Chunk Size : 512K Rebuild Status : 0% complete Name : inti:gentoo (local to host inti) UUID : 03798d73:ad249212:5cbb8dd8:dc1241c9 Events : 682606 Number Major Minor RaidDevice State 6 8 50 0 spare rebuilding /dev/sdd2 4 8 2 1 active sync /dev/sda2 2 8 18 2 active sync /dev/sdb2 5 8 34 3 active sync /dev/sdc2 $ sudo mdadm --version mdadm - v3.2.5 - 18th May 2012 Reproducible: Always Steps to Reproduce: 1. emerge mdadm-3.2.3-r1 2. start an array in a degraded state 3. attempt to add a new drive to the array Actual Results: mdadm returns without doing or printing anything Expected Results: mdadm should add the drive to the array. $ emerge --info Portage 2.1.11.5 (default/linux/amd64/10.0/server, gcc-4.6.3, glibc-2.15-r2, 3.4.3-bfs423.0 x86_64) ================================================================= System uname: Linux-3.4.3-bfs423.0-x86_64-AMD_Athlon-tm-_II_X2_255_Processor-with-gentoo-2.1 Timestamp of tree: Tue, 10 Jul 2012 15:00:01 +0000 distcc 3.1 x86_64-pc-linux-gnu [disabled] ccache version 3.1.7 [enabled] app-shells/bash: 4.2_p29 dev-java/java-config: 2.1.12 dev-lang/python: 2.7.3-r2, 3.2.3-r1 dev-util/ccache: 3.1.7 dev-util/cmake: 2.8.8-r3 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.10.5 sys-apps/sandbox: 2.6 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.5, 1.12.2 sys-devel/binutils: 2.22-r1 sys-devel/gcc: 4.6.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r3 sys-kernel/linux-headers: 3.4-r1 (virtual/os-headers) sys-libs/glibc: 2.15-r2 Repositories: gentoo x-portage shellbeach x-vbox x-bfs-overlay x-xiph forked-daapd chrome-overlay mythtv x-hdhomerun ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=amdfam10 -pipe -O2" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo" CXXFLAGS="-march=amdfam10 -pipe -O2" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--nospinner" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles news parallel-fetch parse-eapi-ebuild-head protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.mirrors.tds.net/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.osuosl.org/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en en_US" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage /usr/local/overlays/shellbeach /usr/local/overlays/vbox /usr/local/overlays/bfs-overlay /usr/local/overlays/xiph /usr/local/overlays/forked-daapd /usr/local/overlays/chrome /usr/local/overlays/mythtv/Gentoo /usr/local/overlays/hdhomerun" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac acl alsa amd64 avahi avi berkdb bzip2 caps cdda cddb cdr cli consolekit cracklib crypt curl cxx dbus device-mapper dri dts dv dvb dvd dvdr dvdread encode exif expat fam fame fbcondecor ffmpeg fftw flac fortran gd gdbm gdu gif gnutls gpm gstreamer gtk gtk2 hal iconv ieee1394 imagemagick ipv6 java jpeg kde kdeenablefinal kdehiddenvisibility kerberos lame lcms lm_sensors logrotate lzma mad mdadm mmap mmx mmxext mng modules mozilla mp3 mpeg mpeg4 mudflap multilib mysql mythtv ncurses nls nptl nptlonly ogg openmp pam pcre php pic png policykit pppd qt qt3support quicktime readline redland samba sasl semantic-desktop server session snmp spell sql sqlite sse sse2 sse3 ssl subtitles svg tcpd threads tidy transcode truetype udev udisks unicode v4l v4l2 vorbis webkit x264 xfs xine xml xml2 xorg xulrunner xvid zeroconf zlib" ALSA_CARDS="intel8x0 bt87x" 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 imagemap include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif so status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="canon logitech" COLLECTD_PLUGINS="cpu cpufreq df disk hddtemp interface load mbmon memory netlink network ntpd rrdcached rrdtool sensors swap thermal tail" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_US" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="nouveau radeon savage siliconmotion fbdev vesa vga" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON