Назад | Перейти на главную страницу

mdadm сборка игнорируя --force? Минимальная разница в действиях Raid 10 между жесткими дисками

На моем сервере запущено 4-х дисковое программное обеспечение raID 10 на основе mdadm.

Ранее из-за небольшого отключения электроэнергии сервер был отключен, и теперь он загружается только в аварийную систему InItrd (Ubuntu 16.04), при этом около двух из четырех сообщений «возможно устарели». Между четырьмя окнами есть небольшая разница в событиях. У двух 6531 событие, у двух 6527 событий.

Я попытался насильно собрать рейд:

mdadm --assemble /dev/md0 /dev/sdb /dev/sdc /dev/sdd /dev/sde --force -v

А также без силы:

mdadm --assemble /dev/md0 /dev/sdb /dev/sdc /dev/sdd /dev/sde -v

Он продолжает жаловаться на устаревшие машины.

Как я могу заставить mdadm игнорировать небольшое различие в событиях?

Вот результаты:

root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdc
/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 8397999f:cd6b31f4:64d31961:759bded9
           Name : debian:0
  Creation Time : Thu May  4 19:39:57 2017
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 624880304 (297.97 GiB 319.94 GB)
     Array Size : 585850880 (558.71 GiB 599.91 GB)
  Used Dev Size : 585850880 (279.36 GiB 299.96 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=39029424 sectors
          State : active
    Device UUID : 0774b3a6:acc10734:1e7c6f76:98b36729

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Aug 11 13:06:38 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 86b594a0 - correct
         Events : 6531

         Layout : offset=2
     Chunk Size : 512K

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


root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdd
/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 8397999f:cd6b31f4:64d31961:759bded9
           Name : debian:0
  Creation Time : Thu May  4 19:39:57 2017
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 976511024 (465.64 GiB 499.97 GB)
     Array Size : 585850880 (558.71 GiB 599.91 GB)
  Used Dev Size : 585850880 (279.36 GiB 299.96 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=390660144 sectors
          State : active
    Device UUID : 6e83f7bf:a19005dc:d714aa81:dc11bd5f

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Aug 11 13:06:38 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 9e7cdf7b - correct
         Events : 6531

         Layout : offset=2
     Chunk Size : 512K

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


root@ubuntu:/home/ubuntu# mdadm --examine /dev/sde
/dev/sde:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 8397999f:cd6b31f4:64d31961:759bded9
           Name : debian:0
  Creation Time : Thu May  4 19:39:57 2017
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 624880304 (297.97 GiB 319.94 GB)
     Array Size : 585850880 (558.71 GiB 599.91 GB)
  Used Dev Size : 585850880 (279.36 GiB 299.96 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=39029424 sectors
          State : active
    Device UUID : f4231c7d:5f51fc96:648cb20e:a07f7845

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Aug 11 13:04:25 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 7465b00b - correct
         Events : 6527

         Layout : offset=2
     Chunk Size : 512K

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



root@ubuntu:/home/ubuntu# mdadm --examine /dev/sdf
/dev/sdf:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x1
     Array UUID : 8397999f:cd6b31f4:64d31961:759bded9
           Name : debian:0
  Creation Time : Thu May  4 19:39:57 2017
     Raid Level : raid10
   Raid Devices : 4

 Avail Dev Size : 585852560 (279.36 GiB 299.96 GB)
     Array Size : 585850880 (558.71 GiB 599.91 GB)
  Used Dev Size : 585850880 (279.36 GiB 299.96 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
   Unused Space : before=262056 sectors, after=1680 sectors
          State : active
    Device UUID : d2440649:3f578698:cf4d7abe:306e7fa3

Internal Bitmap : 8 sectors from superblock
    Update Time : Fri Aug 11 13:04:25 2017
  Bad Block Log : 512 entries available at offset 72 sectors
       Checksum : 4d5502a6 - correct
         Events : 6527

         Layout : offset=2
     Chunk Size : 512K

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


root@ubuntu:/home/ubuntu# mdadm --assemble /dev/md0 /dev/sdc /dev/sdd /dev/sde /dev/sdf -v --force
mdadm: looking for devices for /dev/md0
mdadm: /dev/sdc is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdd is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sde is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdf is identified as a member of /dev/md0, slot 3.
mdadm: added /dev/sdd to /dev/md0 as 1
mdadm: added /dev/sde to /dev/md0 as 2 (possibly out of date)
mdadm: added /dev/sdf to /dev/md0 as 3 (possibly out of date)
mdadm: added /dev/sdc to /dev/md0 as 0
mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.

root@ubuntu:/home/ubuntu# mdadm --assemble /dev/md0 /dev/sdc /dev/sdd /dev/sde /dev/sdf -v --force --run
mdadm: looking for devices for /dev/md0
mdadm: /dev/sdc is identified as a member of /dev/md0, slot 0.
mdadm: /dev/sdd is identified as a member of /dev/md0, slot 1.
mdadm: /dev/sde is identified as a member of /dev/md0, slot 2.
mdadm: /dev/sdf is identified as a member of /dev/md0, slot 3.
mdadm: added /dev/sdd to /dev/md0 as 1
mdadm: added /dev/sde to /dev/md0 as 2 (possibly out of date)
mdadm: added /dev/sdf to /dev/md0 as 3 (possibly out of date)
mdadm: added /dev/sdc to /dev/md0 as 0
mdadm: failed to RUN_ARRAY /dev/md0: Input/output error
mdadm: Not enough devices to start the array.

У меня была такая же проблема с ubuntu-16.04 и RAID5. Несмотря на то, что все метаданные выглядят хорошо и небольшая разница в количестве событий mdadm --force не запускал RAID.

Я загрузил исходный код mdadm-4.0, запустил make и выполнил ту же команду из этого каталога (./mdadm), и все заработало.

Похоже, что ubuntu-16.04 игнорирует --force и делает невозможным запуск массивов даже с самыми незначительными проблемами.

Итак, с 16.04:

mdadm: /dev/sda3 is identified as a member of /dev/md1, slot 0.
mdadm: /dev/sdb3 is identified as a member of /dev/md1, slot 1.
mdadm: /dev/sdd3 is identified as a member of /dev/md1, slot 3.
mdadm: added /dev/sdb3 to /dev/md1 as 1
mdadm: no uptodate device for slot 4 of /dev/md1
mdadm: added /dev/sdd3 to /dev/md1 as 3 (possibly out of date)
mdadm: added /dev/sda3 to /dev/md1 as 0
mdadm: /dev/md1 assembled from 2 drives - not enough to start the array.

С mdadm-4.0, скомпилированным из исходников:

mdadm: looking for devices for /dev/md1
mdadm: /dev/sda3 is identified as a member of /dev/md1, slot 0.
mdadm: /dev/sdb3 is identified as a member of /dev/md1, slot 1.
mdadm: /dev/sdd3 is identified as a member of /dev/md1, slot 3.
mdadm: forcing event count in /dev/sdd3(3) from 15676 upto 15681
mdadm: clearing FAULTY flag for device 2 in /dev/md1 for /dev/sdd3
mdadm: Marking array /dev/md1 as 'clean'
mdadm: added /dev/sdb3 to /dev/md1 as 1
mdadm: no uptodate device for slot 2 of /dev/md1
mdadm: added /dev/sdd3 to /dev/md1 as 3
mdadm: added /dev/sda3 to /dev/md1 as 0
mdadm: /dev/md1 has been started with 3 drives (out of 4).