web-dev-qa-db-ja.com

mdadm raid6アレイを復元する方法は?マウント:スーパーブロックを読み取れません。 8/13ドライブは存在するすべてのドライブを示し、5/13ドライブは存在する5つのドライブのみを示します

今日、サーバーを再起動して、サーバーがハングしているのを見つけました。/dev/md0をロードするfstabのエントリをコメントアウトし、マシンは起動に進みました。 RAIDはアクセス可能で、再起動前に機能していましたが、システムの更新のために再起動しただけです。

サーバーのマザーボードはSupermicro X9SAEであり、システムには14個のディスク、1個のSSDブートドライブ、およびraid6アレイに13個のディスクがあります。アレイの5/13ディスクは、オンボードSataに接続されています。アレイ内の8/13ディスクはITモードLSI 9211-8iに接続されています

Sudo fdisk -lは13個のドライブすべてを表示し、13個のドライブすべてがスマートテストに合格します

コマンドラインから手動でマウントしようとしました:

Sudo mount /dev/md0 /mnt/md0
mount: /mnt/md0: can't read superblock on /dev/md0.

cat /proc/mdstat
md0 : inactive sdh[13](S) sdc[8](S) sdm[0](S) sdb[7](S) sdj[14](S) sdd[9](S) sdk[5](S) sdg[12](S) sda[6](S) sdn[2](S) sdl[1](S) sde[10](S) sdf[11](S)
      76185162872 blocks super 1.2

次に私が試した:

Sudo mdadm --stop /dev/md0
mdadm: stopped /dev/md0

Sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh /dev/sdj /dev/sdk /dev/sdl /dev/sdm /dev/sdn
mdadm: /dev/md0 assembled from 5 drives - not enough to start the array.

オンボードのsdj-sdnに何台接続されているかを5ドライブで試すのは奇妙だと思いました。だから私はカード上のものだけで組み立てようとしました:

Sudo mdadm --assemble /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf /dev/sdg /dev/sdh
mdadm: /dev/md0 assembled from 8 drives - not enough to start the array.

そのようにすることで、8つのドライブから組み立てようとしました。したがって、5つのオンボードディスクがカードに接続されている8つのドライブと同期していないようですが、これは推測にすぎません。次に、各ドライブを調べました。

この次のビットはかなり長くなります。mdadm-13ドライブすべての詳細を調べます。ここで気付いたことは、ドライブsda-sdhはすべて存在するすべてのディスクを表示しますが、ドライブsdj-sdnはアレイ状態で8つのドライブが欠落していることを示し、イベントカウントにも気付きました。オンボードドライブにはイベント:1913088があり、カードには1913085にあります。

Sudo mdadm --examine /dev/sda
/dev/sda:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 344864e7:5e19631d:0b14d41f:58264c67

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : 447ce0e - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 12
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdb
/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 244b3058:6919fa6f:c2499e3d:fb9db6e1

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : 5fdf7e64 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 11
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdc
/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 9081b898:7782d040:acdcc700:e8621ca2

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : f4cd75b5 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 10
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdd
/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 1b569018:549dae95:bbd59910:601886e3

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : 1abf13a6 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 9
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sde
/dev/sde:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 534b24a4:63d20861:502e4012:53fe2652

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : e1f47c75 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 8
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdf
/dev/sdf:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 0821860a:7b75d1cc:bb512247:3dc34a12

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : a924dd98 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 7
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdg
/dev/sdg:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 0c870013:b577639c:eba5f8d4:10a5fee4

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : e1bb7bdb - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 6
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdh
/dev/sdh:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : 06713ac7:ab2a7de0:d6e0d447:52ed0231

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:38 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : 98ef9bf9 - correct
         Events : 1913085

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 5
   Array State : AAAAAAAAAAAAA ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdj
/dev/sdj:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250800 sectors, after=11440 sectors
          State : clean
    Device UUID : d6fb6b75:18fee031:84b97ab4:43ee3754

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:43 2019
  Bad Block Log : 512 entries available at offset 32 sectors
       Checksum : 283bd3b6 - correct
         Events : 1913088

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 3
   Array State : AAAAA........ ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdk
/dev/sdk:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250792 sectors, after=11440 sectors
          State : clean
    Device UUID : aa02fdc1:15332b2a:eee48dee:9d6a91df

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:43 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 3283b76b - correct
         Events : 1913088

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 4
   Array State : AAAAA........ ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdl
/dev/sdl:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250792 sectors, after=11440 sectors
          State : clean
    Device UUID : 4701d341:4c70e117:8a8d37a0:19f8b474

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:43 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : e6dd2971 - correct
         Events : 1913088

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : AAAAA........ ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdm
/dev/sdm:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250792 sectors, after=11440 sectors
          State : clean
    Device UUID : ab1c4435:3c735172:3cf07404:f66f2944

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:43 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 68702233 - correct
         Events : 1913088

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAAA........ ('A' == active, '.' == missing, 'R' == replacing)

Sudo mdadm --examine /dev/sdn
/dev/sdn:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 405dae60:c540c726:087bbaaf:a15c79c5
           Name : ubuntu:0  (local to Host ubuntu)
  Creation Time : Sat Nov  5 18:56:32 2016
     Raid Level : raid6
   Raid Devices : 13

 Avail Dev Size : 11720794288 (5588.91 GiB 6001.05 GB)
     Array Size : 64464305664 (61477.95 GiB 66011.45 GB)
  Used Dev Size : 11720782848 (5588.90 GiB 6001.04 GB)
    Data Offset : 250880 sectors
   Super Offset : 8 sectors
   Unused Space : before=250792 sectors, after=11440 sectors
          State : clean
    Device UUID : b7465e3e:502defd4:dcf61288:b0f14a84

Internal Bitmap : 8 sectors from superblock
    Update Time : Thu Apr 18 09:07:43 2019
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 97e78eb0 - correct
         Events : 1913088

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : AAAAA........ ('A' == active, '.' == missing, 'R' == replacing)

THIS ISまだ機能していた4月17日から:

/dev/md0: 
           Version : 1.2 
     Creation Time : Sat Nov  5 18:56:32 2016 
        Raid Level : raid6 
        Array Size : 64464305664 (61477.95 GiB 66011.45 GB) 
     Used Dev Size : 5860391424 (5588.90 GiB 6001.04 GB) 
      Raid Devices : 13 
     Total Devices : 13 
       Persistence : Superblock is persistent 

     Intent Bitmap : Internal 

       Update Time : Tue Apr 16 19:14:14 2019 
             State : clean  
    Active Devices : 13 
   Working Devices : 13 
    Failed Devices : 0 
     Spare Devices : 0 

            Layout : left-symmetric 
        Chunk Size : 512K 

Consistency Policy : bitmap 

              Name : ubuntu:0  (local to Host ubuntu) 
              UUID : 405dae60:c540c726:087bbaaf:a15c79c5 
            Events : 1913085 

    Number   Major   Minor   RaidDevice State 
       0       8      192        0      active sync   /dev/sdm 
       1       8      176        1      active sync   /dev/sdl 
       2       8      208        2      active sync   /dev/sdn 
      14       8      144        3      active sync   /dev/sdj 
       5       8      160        4      active sync   /dev/sdk 
      13       8      112        5      active sync   /dev/sdh 
      12       8       96        6      active sync   /dev/sdg 
      11       8       80        7      active sync   /dev/sdf 
      10       8       64        8      active sync   /dev/sde 
       9       8       48        9      active sync   /dev/sdd 
       8       8       32       10      active sync   /dev/sdc 
       7       8       16       11      active sync   /dev/sdb 
       6       8        0       12      active sync   /dev/sda

アレイをオンラインに戻すための次のステップは何ですか?

5
xekon

ここでIS何をしたか、アレイはオンラインに戻り、機能しているように見えます。奇妙なことに、最後のメッセージは「アレイを起動するには不十分です」でした。アクティブでクリーンで、すべてのイベント数が一致します。データの破損はどこかで少し発生する可能性がありますが、システムは何日も問題なくアイドル状態だったので、見逃すことはありません。

しばらくの間、システムとイベント数を注意深く監視します。

Sudo mdadm --stop /dev/md0
Sudo mdadm --assemble --scan --force

mdadm: forcing event count in /dev/sdh(5) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sdg(6) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sdf(7) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sde(8) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sdd(9) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sdc(10) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sdb(11) from 1913085 upto 1913088
mdadm: forcing event count in /dev/sda(12) from 1913085 upto 1913088
mdadm: clearing FAULTY flag for device 0 in /dev/md0 for /dev/sdh
mdadm: clearing FAULTY flag for device 1 in /dev/md0 for /dev/sdg
mdadm: clearing FAULTY flag for device 3 in /dev/md0 for /dev/sdf
mdadm: clearing FAULTY flag for device 2 in /dev/md0 for /dev/sde
mdadm: clearing FAULTY flag for device 4 in /dev/md0 for /dev/sdd
mdadm: clearing FAULTY flag for device 5 in /dev/md0 for /dev/sdc
mdadm: clearing FAULTY flag for device 6 in /dev/md0 for /dev/sdb
mdadm: clearing FAULTY flag for device 7 in /dev/md0 for /dev/sda
mdadm: Marking array /dev/md0 as 'clean'
mdadm: /dev/md0 assembled from 13 drives - not enough to start the array.
2
xekon