From: Brian Candler <B.Candler@pobox.com>
To: linux-raid@vger.kernel.org
Subject: RAID6 fails to assemble after unclean shutdown
Date: Wed, 25 Apr 2012 11:35:36 +0100 [thread overview]
Message-ID: <20120425103536.GA9978@nsrc.org> (raw)
I have a storage box (currently under test) which has two 12-drive RAID6
arrays, /dev/md/data1 and /dev/md/data2.
The box crashed for an unrelated reason, and when I brought it back up, only
one of the arrays assembled:
root@storage1:~# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md126 : active raid6 sdj[8] sdk[9] sdd[2] sde[3] sdi[7] sdm[11] sdg[5] sdc[1] sdb[0] sdl[10] sdh[6] sdf[4]
29302650880 blocks super 1.2 level 6, 1024k chunk, algorithm 2 [12/12] [UUUUUUUUUUUU]
md127 : inactive sdq[3](S) sdx[10](S) sdu[6](S) sdt[5](S) sds[4](S) sdv[8](S) sdp[2](S) sdy[11](S) sdo[1](S) sdn[0](S) sdw[9](S) sdr[7](S)
35163186720 blocks super 1.2
unused devices: <none>
So it looks like 12 of the disks have all become spares (S)!
An attempt to manually assemble the array failed:
root@storage1:~# mdadm --stop /dev/md127
mdadm: stopped /dev/md127
root@storage1:~# mdadm --assemble /dev/md/disk2 /dev/sd{n..y}
mdadm: /dev/md/disk2 assembled from 4 drives - not enough to start the array.
Since this is currently under test system I just forcibly recreated the
array, but I'm a bit worried about how I would handle this problem when I go
into production.
Here is how I recreated the array:
root@storage1:~# mdadm --create /dev/md/disk2 -n 12 -c 1024 -l raid6 /dev/sd{n..y}
mdadm: /dev/sdn appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdo appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdp appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdq appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdr appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sds appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdt appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdu appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdv appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdw appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdx appears to be part of a raid array:
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
mdadm: /dev/sdy appears to be part of a raid array:
# /etc/fstab: static file system information.
level=raid6 devices=12 ctime=Mon Mar 19 11:52:55 2012
Continue creating array? y
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/disk2 started.
So it seems like all the disks were known to be part of an array, but mdadm
was still unable to assemble more than 4.
Platform: Ubuntu 11.10 server x86_64, stock kernel:
Linux storage1 3.0.0-16-server #29-Ubuntu SMP Tue Feb 14 13:08:12 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
Unfortunately I saw the same problem once before on a different test system,
and also had to forcibly rebuild the array.
So my questions are:
* Have I built the RAID array correctly in the first place? Are there some
options I could have given to mdadm to make it more robust?
* What should I have done when presented with an array which would not
assemble, to attempt to recover without losing data?
* Any ideas why mdadm only thought 4 of the drives were usable?
Thanks,
Brian.
next reply other threads:[~2012-04-25 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-25 10:35 Brian Candler [this message]
2012-04-25 11:01 ` RAID6 fails to assemble after unclean shutdown NeilBrown
2012-04-25 11:16 ` Brian Candler
2012-04-26 2:58 ` Bill Davidsen
2012-04-26 3:50 ` Keith Keller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120425103536.GA9978@nsrc.org \
--to=b.candler@pobox.com \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.