Re: [Hampshire] mdadm/RAID0 issues after Ubuntu upgrade 8.04…

Top Page

Reply to this message
Author: Benjie Gillam
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] mdadm/RAID0 issues after Ubuntu upgrade 8.04 > 11.10
Sorry, I meant RAID1 - the 0 of md0 must have confused me in my slightly
inebriated state last night :-$

This morning the computer booted first time with the second drive detected
as /dev/sdf so that obviously isn't the issue...

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda5
       1       8       85        1      active sync   /dev/sdf5


So I'm none the wiser. :-/

Benjie.

On 26 December 2011 21:33, Benjie Gillam <benjie@???> wrote:

> Hi all,
>
> I installed Ubuntu for my parents many many moons ago. I had upgraded it
> as far as Hardy and then I left it. Recently they've been complaining that
> certain websites aren't working (due to flash being too old) and their
> printers drivers not being fully reliable. "No problem," thinks I, I'll
> just update to 11.10. I have done so, and Unity issues aside (I've
> installed GNOME Classic for them now) it's gone well...
>
> EXCEPT the computer only boots roughly 1 time in 3 (no obvious pattern).
> The issue, I've found, is due to their RAID0 /home partition not
> initialising correctly sometimes (sometimes it's "degraded mode", sometimes
> no message at all, it just locks up). I've had a good poke around and it
> seems that it doesn't work when /dev/sdb is detected as /dev/sdf instead. I
> know this in itself isn't a bug, but it seems to be what is causing the
> issue. I was expecting it to Just Work (TM) since it does for all the other
> boxes that I have RAID on. I thought the persistent superblock should stop
> this issue from happening, but autodetection seems to be failing early
> during boot.
>
> I've added relevant data to the bottom of the email to rule out some
> common issues/confirm what I've done/point out an obvious issue I may have
> overlooked...
>
> For autodetection I require, according to
> http://tldp.org/HOWTO/Software-RAID-HOWTO.html#toc7.2
> 1) Autodetection in the kernel [I have stock Ubuntu 11.10 kernel - perhaps
> this is missing/missing from the initrd]
> 2) Persistent-superblock [mdadm claims this to be the case - see below]
> 3) 0xFD partition types [fdisk claims this to be the case]
>
> From /var/log/syslog (or /var/log/messages) we get:
> Dec 26 09:12:15 ann-desktop kernel: [    3.251290] md: bind<sda5>
> Dec 26 09:12:15 ann-desktop kernel: [    3.290692] md: bind<sdb5>
> Dec 26 09:12:15 ann-desktop kernel: [    3.293935] bio: create slab
> <bio-1> at 1
> Dec 26 09:12:15 ann-desktop kernel: [    3.294070] md/raid1:md0: active
> with 2 out of 2 mirrors
> Dec 26 09:12:15 ann-desktop kernel: [    3.294097] md0: detected capacity
> change from 0 to 151846780928
> Dec 26 09:12:15 ann-desktop kernel: [    3.296464]  md0: unknown partition
> table

>
> This suggests to me that auto-detection is not occurring, so installing
> something (kernel modules/settings/app/whatever) and then doing "update-initramfs
> -u" should presumably fix this issue, but I've not much longer to solve
> it before I leave to go back home tomorrow. Any ideas would be greatly
> appreciated.
>
> Further details follow.
>
> I hope you're all having a great Christmas! Happy New Year!
>
> Cheers,
>
> Benjie.
>
>
> / is not RAID (why bother, just replace)
> /home is RAID0 (custom set up via mdadm about 4 years ago)
> Two equal sized drives.
> The RAID, once it's running, is absolutely fine. It's just detection that
> fails.
>
>
> $ sudo fdisk -l /dev/sda
> Disk /dev/sda: 160.0 GB, 160041885696 bytes
> 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x00000000
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sda1   *          63    16000739     8000338+  83  Linux
> /dev/sda2        16000740   312576704   148287982+   5  Extended
> /dev/sda5        16000803   312576704   148287951   fd  Linux RAID
> autodetect

>
>
> $ sudo fdisk -l /dev/sdb
> Disk /dev/sdb: 160.0 GB, 160041885696 bytes
> 255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
> Units = sectors of 1 * 512 = 512 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x000aa89b
>
>    Device Boot      Start         End      Blocks   Id  System
> /dev/sdb1              63     4000184     2000061   82  Linux swap /
> Solaris
> /dev/sdb2        16000801   312576704   148287952    5  Extended
> /dev/sdb5        16000803   312576704   148287951   fd  Linux RAID
> autodetect

>
>
> $ cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> [raid4] [raid10]
> md0 : active raid1 sda5[0] sdb5[1]
>       148287872 blocks [2/2] [UU]

>
> unused devices: <none>
>
>
> $ sudo mdadm --detail /dev/md0
> /dev/md0:
>         Version : 0.90
>   Creation Time : Fri Nov 16 12:01:45 2007
>      Raid Level : raid1
>      Array Size : 148287872 (141.42 GiB 151.85 GB)
>   Used Dev Size : 148287872 (141.42 GiB 151.85 GB)
>    Raid Devices : 2
>   Total Devices : 2
> Preferred Minor : 0
>     Persistence : Superblock is persistent

>
>     Update Time : Mon Dec 26 21:06:17 2011
>           State : clean
>  Active Devices : 2
> Working Devices : 2
>  Failed Devices : 0
>   Spare Devices : 0

>
>            UUID : f0a0371d:12376ea7:4c4ad349:bc95e7b8
>          Events : 0.436

>
>     Number   Major   Minor   RaidDevice State
>        0       8        5        0      active sync   /dev/sda5
>        1       8       21        1      active sync   /dev/sdb5

>

--
Please post to: Hampshire@???
Web Interface: https://mailman.lug.org.uk/mailman/listinfo/hampshire
LUG URL: http://www.hantslug.org.uk
--------------------------------------------------------------