Software RAID fails to rebuild after testing degraded cold boot
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
mdadm (Ubuntu) |
Confirmed
|
Medium
|
Dimitri John Ledkov |
Bug Description
Attempting the RAID install test with Precise server AMD64.
Hardware config is a 1U server with 2 SATA drives wth the following partitions:
sda: 500GB SATA
sda1: 50GB RAID
sda2: 20GB RAID
sda3: 180GB RAID
sdb: 250GB SATA
sdb1: 50GB RAID
sdb2: 20GB RAID
sdb3: 180GB RAID
Using the instructions found here: http://
I created the three partitions for each physical disk. I then created three RAID deviecs, md0 - md2 as follows:
md0: 50GB RAID1 using sda1 and sdb1 for /
md1: 20GB RAID1 using sda2 and sdb2 for swap
md2: 180GB RAID1 using sda3 and sdb3 for /home
I then completed the install and reboot. On the initial boot, I verified that all three RAID devices were present and active:
bladernr@ubuntu:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0] sdb1[1]
48826296 blocks super 1.2 [2/2] [UU]
md2: active raid1 sda3[0] sdb3[1]
175838136 blocks super 1.2 [2/2] [UU]
md1: active raid1 sda2[0] sdb2[1]
19529656 blocks super 1.2 [2/2] [UU]
I then powered the machine down per the test case instructions, removed disk 2 (sdb) and powered back up. On reboot, I verified that the array was active and degraded and powered the system back down, again per the test instructions.
I re-inserted drive2 (sdb) and powered the system up again. After logging in, I rechecked /dev/mdstat, expecting to see both drives for each md device and a resync in progress. Instead, I found that the second drive was missing from md0 and md2 while md1 (the swap LUN) was fine.
bladernr@ubuntu:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[0]
48826296 blocks super 1.2 [2/1] [U_]
md2: active raid1 sda3[0]
175838136 blocks super 1.2 [2/1][U_]
md1: active raid1 sda2[0] sdb2[1]
19529656 blocks super 1.2 [2/2] [UU]
The instructions indicated that I may have to re-add the drives that are missing manually, so I attemted this:
bladernr@ubuntu:~$ sudo mdadm --add /dev/md0 /dev/sdb1
mdadm: /dev/sdb1 reports being an active member for /dev/md0, but a --re-add fails.
mdadm: not performing --add as that would convert /dev/sdb1 in to a spare.
mdadm: To make this a spare, use "mdadm --zero-superblock /dev/sdb1" first.
I also tried using --re-add:
bladernr@ubuntu~$ sudo mdadm --re-add /dev/md0 /dev/sdb1
mdadm: --re-add for /dev/sdb1 to /dev/md0 is not possible
So here's some info from mdadm:
/dev/md0:
Creation Time : Wed Feb 1 20:53:34
Raid Level : raid1
Array Size : 48826296 (46.56 GiB 50.00GB)
Used Dev Size : 48826296 (46.56 GiB 50.00GB)
Raid Devices : 2
Total Devices : 1
Update Time : Wed Feb 1 23:54:04 2012
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Number Major Minor RaidDevices State
0 8 1 0 active sync /dev/sda1
1 0 0 1 removed
So according to the test instructions, this test is a failure because I can't rebuild the array (nor is it automatically rebuilt).
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-
ProcVersionSign
Uname: Linux 3.2.0-12-generic x86_64
AlsaDevices:
total 0
crw-rw---T 1 root audio 116, 1 Feb 1 23:35 seq
crw-rw---T 1 root audio 116, 33 Feb 1 23:35 timer
AplayDevices: Error: [Errno 2] No such file or directory
ApportVersion: 1.91-0ubuntu1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: Error: [Errno 2] No such file or directory
Date: Wed Feb 1 23:38:28 2012
HibernationDevice: RESUME=
InstallationMedia: Ubuntu-Server 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120201.1)
IwConfig:
lo no wireless extensions.
eth1 no wireless extensions.
eth0 no wireless extensions.
MachineType: Supermicro X7DVL
PciMultimedia:
ProcEnviron:
LANG=en_US.UTF-8
SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=
RelatedPackageV
linux-
linux-
linux-firmware 1.68
RfKill: Error: [Errno 2] No such file or directory
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 06/23/2008
dmi.bios.vendor: Phoenix Technologies LTD
dmi.bios.version: 2.1
dmi.board.name: X7DVL
dmi.board.vendor: Supermicro
dmi.board.version: PCB Version
dmi.chassis.type: 1
dmi.chassis.vendor: Supermicro
dmi.chassis.
dmi.modalias: dmi:bvnPhoenixT
dmi.product.name: X7DVL
dmi.product.
dmi.sys.vendor: Supermicro
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
Changed in mdadm (Ubuntu): | |
status: | New → Incomplete |
importance: | Undecided → Medium |
Changed in mdadm (Ubuntu): | |
status: | New → Confirmed |
no longer affects: | linux (Ubuntu) |
Changed in mdadm (Ubuntu): | |
assignee: | nobody → Dmitrijs Ledkovs (dmitrij.ledkov) |
I finally found a solution. I had to zero the superblocks on the missing partitions:
sudo mdadm --zero-superblock /dev/sdb1
sudo mdamd --zero-superblock /dev/sdb3
sudo mdadm --manage /dev/md0 --add /dev/sdb1
sudo mdadm --manage /dev/md2 --add /dev/sdb3
This now shows md0 currently in recovery and md2 as rsync=DELAYED.
So either the instructions are incorrect, or there is an issue in how these devices are handled. This test really should not have degraded the array (or disks) to the extent that I had to zero the second disk to re-add.
Also it's worrysome that this only occurred on the ext4 LUN and did not affect the swap LUN.