Re: Help - raid not assembling right on boot (was: Resizing a RAID1)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The system presently boots from /dev/sda:
=============================
hbarta@oak:~$ sudo fdisk -luc /dev/sda

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders, total 390721968 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: 0x000c071b

  Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    39063551    19530752   83  Linux
/dev/sda2        39065598   390721535   175827969    5  Extended
/dev/sda5        39065600    54687743     7811072   82  Linux swap / Solaris
/dev/sda6        54689792   390721535   168015872   83  Linux
hbarta@oak:~$
=============================

Eventually I plan to migrate the RAID to another system where it will
boot from what is now /dev/sd[bc]

At present I have the RAID listed in /etc/fstab so the boot process
stalls when it tries to mount /dev/md2. At that point I can get to a
console and:
- stop a spurious RAID listed in /proc/mdstat. This is named
/dev/md_<something>. I copied /proc/mdstat to /tmp at that point but
this is apparently before /tmp gets cleared on boot.
- stop /dev/md2 At this point in the boot process it has not started to resync.
- assemble /dev/md2. This time it does not start resync.
- mount /dev/md2
- exit the console and complete the boot process.

In the output below, I have highlighted some lines of particular
interest using "<<<<<<<<<<<<<<<<<<<<<<<<"

>From dmesg I find:
=============================
[    1.777908] udev: starting version 151
[    1.782359] md: linear personality registered for level -1
...
[    1.797816] md: multipath personality registered for level -4
...
[    1.814115] md: raid0 personality registered for level 0
...
[    2.706178] md: raid1 personality registered for level 1
...
[    2.730265] md: bind<sdb>
   <<<<<<<<<<<<<<<<<<<<<<<<
[    2.768834] md: bind<sdc>
   <<<<<<<<<<<<<<<<<<<<<<<<
[    2.770005] raid1: raid set md2 active with 2 out of 2 mirrors
[    2.770022] md2: detected capacity change from 0 to 1989660377088
[    2.779491]  md2: p1 p2
[    2.810420] md2: p2 size 3886055600 exceeds device capacity,
limited to end of disk
[    2.871677] raid6: int64x1   2414 MB/s
[    3.041683] raid6: int64x2   3306 MB/s
[    3.211675] raid6: int64x4   2498 MB/s
[    3.381687] raid6: int64x8   2189 MB/s
[    3.551687] raid6: sse2x1    3856 MB/s
[    3.721674] raid6: sse2x2    6233 MB/s
[    3.891676] raid6: sse2x4    7434 MB/s
[    3.891678] raid6: using algorithm sse2x4 (7434 MB/s)
[    3.892539] xor: automatically using best checksumming function: generic_sse
[    3.941685]    generic_sse: 11496.800 MB/sec
[    3.941687] xor: using function: generic_sse (11496.800 MB/sec)
[    3.944793] md: raid6 personality registered for level 6
[    3.944795] md: raid5 personality registered for level 5
[    3.944796] md: raid4 personality registered for level 4
[    3.949094] md: raid10 personality registered for level 10
[    4.034790] EXT4-fs (sda1): mounted filesystem with ordered data mode
...
[   15.313074] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   15.322662] md: bind<md2p1>
      <<<<<<<<<<<<<<<<<<<<<<<<
[   15.347522] [drm] ring test succeeded in 1 usecs
=============================

and finally where boot process halts and I intervene manually:

=============================
[   16.147562] EXT4-fs (sda6): mounted filesystem with ordered data mode
[   16.532107] EXT4-fs (md2p2): bad geometry: block count 485756928
exceeds size of device (483135232 blocks)
[  212.816279] md: md_d0 stopped.
[  212.816289] md: unbind<md2p1>
[  212.861783] md: export_rdev(md2p1)
[  225.764663] md: md2 stopped.
[  225.764669] md: unbind<sdc>
[  225.811751] md: export_rdev(sdc)
[  225.811779] md: unbind<sdb>
[  225.891748] md: export_rdev(sdb)
[  249.653886] md: md2 stopped.
[  249.655627] md: bind<sdb2>
[  249.655788] md: bind<sdc2>
[  249.679172] raid1: raid set md2 active with 2 out of 2 mirrors
[  249.679194] md2: detected capacity change from 0 to 1989660377088
[  249.680142]  md2: unknown partition table
[  270.774369] EXT4-fs (md2): mounted filesystem with ordered data mode
=============================
(no further pattern match in dmesg for 'md:')

The following command seems to find a RAID superblock on /dev/sdb and
/dev/sdc which would explain why they are assembled at boot:
=============================
root@oak:/var/log# mdadm --examine --scan -vv
mdadm: No md superblock detected on /dev/block/9:2.
/dev/sdc2:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 19d72028:63677f91:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Tue Jan 25 10:39:52 2011
    Raid Level : raid1
 Used Dev Size : 1943027712 (1853.02 GiB 1989.66 GB)
    Array Size : 1943027712 (1853.02 GiB 1989.66 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Thu Jan 27 07:12:16 2011
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 6b4365e0 - correct
        Events : 13448


     Number   Major   Minor   RaidDevice State
this     0       8       34        0      active sync   /dev/sdc2

  0     0       8       34        0      active sync   /dev/sdc2
  1     1       8       18        1      active sync   /dev/sdb2
/dev/sdc1:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 954a3be2:f23e1239:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Wed Jan 26 20:20:06 2011
    Raid Level : raid1
 Used Dev Size : 10485696 (10.00 GiB 10.74 GB)
    Array Size : 10485696 (10.00 GiB 10.74 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 0

   Update Time : Wed Jan 26 21:16:05 2011
         State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 25dccb8 - correct
        Events : 3


     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
/dev/sdc:
              <<<<<<<<<<<<<<<<<<<<<<<<
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 19d72028:63677f91:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Tue Jan 25 10:39:52 2011
    Raid Level : raid1
 Used Dev Size : 1943027712 (1853.02 GiB 1989.66 GB)
    Array Size : 1943027712 (1853.02 GiB 1989.66 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Thu Jan 27 07:12:16 2011
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 6b4365e0 - correct
        Events : 13448


     Number   Major   Minor   RaidDevice State
this     0       8       34        0      active sync   /dev/sdc2

  0     0       8       34        0      active sync   /dev/sdc2
  1     1       8       18        1      active sync   /dev/sdb2
/dev/sdb2:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 19d72028:63677f91:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Tue Jan 25 10:39:52 2011
    Raid Level : raid1
 Used Dev Size : 1943027712 (1853.02 GiB 1989.66 GB)
    Array Size : 1943027712 (1853.02 GiB 1989.66 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Thu Jan 27 07:12:16 2011
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 6b4365d2 - correct
        Events : 13448


     Number   Major   Minor   RaidDevice State
this     1       8       18        1      active sync   /dev/sdb2

  0     0       8       34        0      active sync   /dev/sdc2
  1     1       8       18        1      active sync   /dev/sdb2
/dev/sdb1:
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 954a3be2:f23e1239:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Wed Jan 26 20:20:06 2011
    Raid Level : raid1
 Used Dev Size : 10485696 (10.00 GiB 10.74 GB)
    Array Size : 10485696 (10.00 GiB 10.74 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 0

   Update Time : Wed Jan 26 21:16:05 2011
         State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 25dccb8 - correct
        Events : 3


     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
/dev/sdb:
             <<<<<<<<<<<<<<<<<<<<<<<<
         Magic : a92b4efc
       Version : 00.90.00
          UUID : 19d72028:63677f91:cd71bfd9:6916a14f (local to host oak)
 Creation Time : Tue Jan 25 10:39:52 2011
    Raid Level : raid1
 Used Dev Size : 1943027712 (1853.02 GiB 1989.66 GB)
    Array Size : 1943027712 (1853.02 GiB 1989.66 GB)
  Raid Devices : 2
 Total Devices : 2
Preferred Minor : 2

   Update Time : Thu Jan 27 07:12:16 2011
         State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
 Spare Devices : 0
      Checksum : 6b4365d2 - correct
        Events : 13448


     Number   Major   Minor   RaidDevice State
this     1       8       18        1      active sync   /dev/sdb2

  0     0       8       34        0      active sync   /dev/sdc2
  1     1       8       18        1      active sync   /dev/sdb2
mdadm: No md superblock detected on /dev/sda6.
mdadm: No md superblock detected on /dev/sda5.
mdadm: No md superblock detected on /dev/sda2.
mdadm: No md superblock detected on /dev/sda1.
mdadm: No md superblock detected on /dev/sda.
root@oak:/var/log#
=============================

If I try to zero the superblock that seems to be in error, I get:
=============================
root@oak:/var/log# mdadm --zero-superblock /dev/sdb
mdadm: Couldn't open /dev/sdb for write - not zeroing
root@oak:/var/log#
=============================

thanks again,
hank


On Thu, Jan 27, 2011 at 6:37 AM, Justin Piszcz <jpiszcz@xxxxxxxxxxxxxxx> wrote:
>
> On Thu, 27 Jan 2011, Hank Barta wrote:
>
>> Thanks for the suggestion:
>>
>> =============================
>> hbarta@oak:~$ sudo fdisk -luc /dev/sd[bc]
>>
>> Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
>> 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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/sdb1            2048    20973567    10485760   fd  Linux raid
>> autodetect
>> /dev/sdb2        20973568  3907029167  1943027800   fd  Linux raid
>> autodetect
>>
>> Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
>> 255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 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/sdc1            2048    20973567    10485760   fd  Linux raid
>> autodetect
>> /dev/sdc2        20973568  3907029167  1943027800   fd  Linux raid
>> autodetect
>> hbarta@oak:~$
>> =============================
>>
>> Everything seems OK as far as I can see.
>>
>> thanks,
>> hank
>
> Hi,
>
> That looks correct, so you boot from /dev/sdb, /dev/sdc?  Normally when I
> do a RAID1 it is with /dev/sda, /dev/sdb for SATA systems...  It looks
> good, if you reboot again does it want to resync again?
>
> Justin.
>
>
>



--
'03 BMW F650CS - hers
'98 Dakar K12RS - "BABY K" grew up.
'93 R100R w/ Velorex 700 (MBD starts...)
'95 Miata - "OUR LC"
polish visor: apply squashed bugs, rinse, repeat
Beautiful Sunny Winfield, Illinois
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux