Looked into this more today and found that for some reason my array is
not being detected and assembled correctly after a reboot.

I've got a RAID 5 with 4 disks:
/dev/sdb1
/dev/sdc1
/dev/sdd1
/dev/sde1

Here's what I've accomplished so far:

1) I removed /dev/sde1 using "sudo mdadm /dev/md0 --fail /dev/sde1 --remove 
/dev/sde1"
2) I zeroed it's superblock using "sudo mdadm --zero-superblock /dev/sde1"
3) I zeroed the entire disk with "sudo dd if=/dev/zero of=/dev/sde bs=1M"
4) I created a new msdos partition table and added 1 partition using the full 
size of the disk with gparted.
5) I reformatted the partition with "sudo mkfs.xfs -f -b size=4096 -d 
sunit=128,swidth=384 -L mythtv /dev/sde"
6) Finally, I added the disk back into the raid array using "sudo mdadm 
/dev/md0 --add /dev/sde1"

After rebuilding the array on all 4 disks, everything was working.  I could 
unmount the partition, stop /dev/md0, and then restart it by doing:
sudo umount /media/terabyte
sudo mdadm --stop /dev/md0
sudo mdadm --assemble --scan

This worked fine before a reboot.  After rebooting just now, it failed to bring 
the array up, giving the familiar error:
"the disk for/mnt/md0 is not ready yet or not present. Continue to wait; or 
Press S to skip mount or M for manual recovery."

I logged in and tried to assemble the array, but got this:
-------------------------------------------------------------------------
trinitr...@saturn:~$ sudo mdadm --assemble --scan -v
mdadm: looking for devices for further assembly
mdadm: cannot open device /dev/sdd1: Device or resource busy
mdadm: cannot open device /dev/sdd: Device or resource busy
mdadm: no recogniseable superblock on /dev/sde
mdadm: cannot open device /dev/sdc1: Device or resource busy
mdadm: cannot open device /dev/sdc: Device or resource busy
mdadm: cannot open device /dev/sdb1: Device or resource busy
mdadm: cannot open device /dev/sdb: Device or resource busy
mdadm: cannot open device /dev/sda6: Device or resource busy
mdadm: cannot open device /dev/sda5: Device or resource busy
mdadm: no recogniseable superblock on /dev/sda2
mdadm: cannot open device /dev/sda1: Device or resource busy
mdadm: cannot open device /dev/sda: Device or resource busy
mdadm: No arrays found in config file or automatically


trinitr...@saturn:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] 
[raid10] 
md0 : inactive sdb1[0](S) sdc1[1](S) sdd1[2](S)
      2197715712 blocks
       
unused devices: <none>

trinitr...@saturn:~$ sudo mdadm --detail /dev/md0
mdadm: md device /dev/md0 does not appear to be active.
-------------------------------------------------------------------------

Now, examining the superblocks on the rest of the disks shows that /dev/sde1 is 
missing!!!
Trying to examine /dev/sde1 says that the device does not exist!!

I've repeated this multiple times and cannot figure out what it's problem is.
Here is the superblock information from /dev/sde1 and the first 3 disks:

-------------------------------------------------------------------------
trinitr...@saturn:~$ sudo mdadm --examine /dev/sde1
mdadm: cannot open /dev/sde1: No such file or directory

trinitr...@saturn:~$ sudo mdadm --examine /dev/sdb1
/dev/sdb1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 7a0e5ba8:669595fc:852484a6:e390a598 (local to host saturn)
  Creation Time : Fri Jan  9 03:40:39 2009
     Raid Level : raid5
  Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
     Array Size : 2197715712 (2095.91 GiB 2250.46 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Sun May 16 22:13:13 2010
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : b38b3afe - correct
         Events : 122066

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     0       8       17        0      active sync   /dev/sdb1

   0     0       8       17        0      active sync   /dev/sdb1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       49        2      active sync   /dev/sdd1
   3     3       8       65        3      active sync


trinitr...@saturn:~$ sudo mdadm --examine /dev/sdc1
/dev/sdc1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 7a0e5ba8:669595fc:852484a6:e390a598 (local to host saturn)
  Creation Time : Fri Jan  9 03:40:39 2009
     Raid Level : raid5
  Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
     Array Size : 2197715712 (2095.91 GiB 2250.46 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Sun May 16 22:13:13 2010
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : b38b3b10 - correct
         Events : 122066

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     1       8       33        1      active sync   /dev/sdc1

   0     0       8       17        0      active sync   /dev/sdb1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       49        2      active sync   /dev/sdd1
   3     3       8       65        3      active sync

trinitr...@saturn:~$ sudo mdadm --examine /dev/sdd1
/dev/sdd1:
          Magic : a92b4efc
        Version : 00.90.00
           UUID : 7a0e5ba8:669595fc:852484a6:e390a598 (local to host saturn)
  Creation Time : Fri Jan  9 03:40:39 2009
     Raid Level : raid5
  Used Dev Size : 732571904 (698.64 GiB 750.15 GB)
     Array Size : 2197715712 (2095.91 GiB 2250.46 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 0

    Update Time : Sun May 16 22:13:13 2010
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0
       Checksum : b38b3b22 - correct
         Events : 122066

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     2       8       49        2      active sync   /dev/sdd1

   0     0       8       17        0      active sync   /dev/sdb1
   1     1       8       33        1      active sync   /dev/sdc1
   2     2       8       49        2      active sync   /dev/sdd1
   3     3       8       65        3      active sync
-------------------------------------------------------------------------

Attached is a kernel messages log which shows the array up and running before 
the reboot, then after the reboot no array is started.  I also examined the 
partition tables on the disks, and it seems to be missing for /dev/sde !
-------------------------------------------------------------------------
trinitr...@saturn:/media$ sudo fdisk -l /dev/sde

Disk /dev/sde: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sde doesn't contain a valid partition table
-------------------------------------------------------------------------

Arg!!!  This is the 4th time I've had to repartition this disk after a
reboot.  Up until the reboot, everything is fine, but something messes
up the partition table of /dev/sde after a reboot.

-- 
Mdadm array fails to assemble on boot.
https://bugs.launchpad.net/bugs/573477
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to