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

Невозможно смонтировать том RAID 5

Вечер всем,

Всего n00b, когда дело доходит до Linux, я использую Xpenology (Synology) в качестве программного обеспечения NAS и из-за неисправного кабеля SATA потерял свой том RAID 5 - в ОС он находился в аварийном состоянии.

Благодаря помощи другого пользователя ServerFault мне удалось вставить недостающие диски и вернуть их из деградированного состояния, но я понятия не имею, что делать дальше.

SUPERSYNO> cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid5 sdd5[0] sdk5[7] sdj5[6] sdi5[5] sdh5[4] sdg5[3] sdf5[2] sde5[1]
  20478048192 blocks super 1.2 level 5, 64k chunk, algorithm 2 [8/8] [UUUUUUUU]

md3 : active raid5 sde6[0] sdj6[2] sdh6[5] sdk6[4] sdi6[6]
  3906971648 blocks super 1.2 level 5, 64k chunk, algorithm 2 [5/5] [UUUUU]

md1 : active raid1 sdc2[0] sdd2[2] sde2[1] sdf2[3] sdg2[4] sdh2[5] sdi2[6] sdj2[7] sdk2[8]
  2097088 blocks [12/9] [UUUUUUUUU___]

md0 : active raid1 sdc1[0] sdd1[8] sde1[1] sdf1[7] sdg1[5] sdh1[4] sdi1[6] sdj1[3] sdk1[2]
  2490176 blocks [12/9] [UUUUUUUUU___]

unused devices: <none>

Понятия не имею, почему здесь 4 мкр, может в этом причина?

SUPERSYNO> mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Sat Dec 22 12:19:43 2018
Raid Level : raid5
Array Size : 20478048192 (19529.39 GiB 20969.52 GB)
Used Dev Size : 2925435456 (2789.91 GiB 2995.65 GB)
Raid Devices : 8
Total Devices : 8
Persistence : Superblock is persistent

Update Time : Sat Dec 22 22:13:59 2018
      State : clean
Active Devices : 8
Working Devices : 8
Failed Devices : 0
Spare Devices : 0

     Layout : left-symmetric
 Chunk Size : 64K

       Name : SUPERSYNO:2  (local to host SUPERSYNO)
       UUID : 7d8b04cf:aebb8d01:6034359b:c4bb62db
     Events : 110

Number   Major   Minor   RaidDevice State
   0       8       53        0      active sync   /dev/sdd5
   1       8       69        1      active sync   /dev/sde5
   2       8       85        2      active sync   /dev/sdf5
   3       8      101        3      active sync   /dev/sdg5
   4       8      117        4      active sync   /dev/sdh5
   5       8      133        5      active sync   /dev/sdi5
   6       8      149        6      active sync   /dev/sdj5
   7       8      165        7      active sync   /dev/sdk5

Если я попытаюсь установить его, я получу

SUPERSYNO> mount /dev/md2 /mnt
mount: mounting /dev/md2 on /mnt failed: No such device

Если я запускаю fsck.ext4, я получаю следующее:

SUPERSYNO> fsck.ext4 /dev/md2
e2fsck 1.42.6 (21-Sep-2012)
ext2fs_open2: Bad magic number in super-block
fsck.ext4: Superblock invalid, trying backup blocks...
fsck.ext4: Bad magic number in super-block while trying to open /dev/md2

The superblock could not be read or does not describe a correct ext2 filesystem.  
If the device is valid and it really contains an ext2 filesystem (and not swap or 
ufs or something else), then the superblock is corrupt, and you might try running 
e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

Если я сделаю fdisk -l, я получу следующее:

SUPERSYNO> fdisk -l

Disk /dev/sdc: 5368 MB, 5368709120 bytes
255 heads, 63 sectors/track, 652 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdc1               1         311     2490240  fd Linux raid autodetect
Partition 1 does not end on cylinder boundary
/dev/sdc2             311         572     2097152  fd Linux raid autodetect
Partition 2 does not end on cylinder boundary
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdd: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdd1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sde: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sde1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdf: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdf1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdg: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdg1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdh: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdh1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdi: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdi1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdj: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdj1               1      267350  2147483647+ ee EFI GPT
fdisk: device has more than 2^32 sectors, can't use all of them

Disk /dev/sdk: 2199.0 GB, 2199023255040 bytes
255 heads, 63 sectors/track, 267349 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks  Id System
/dev/sdk1               1      267350  2147483647+ ee EFI GPT

До этих результатов, чтобы переупорядочить диски, я выполнил приведенную ниже команду, выполнение которой заняло около 9 часов. Надеюсь, это не стерло его?

mdadm -Cf /dev/md2 -e1.2 -n8 -l5 /dev/sdd5 /dev/sde5 /dev/sdf5 /dev/sdg5 /dev/sdh5 /dev/sdi5 /dev/sdj5 /dev/sdk5 -u7d8b04cf:aebb8d01:6034359b:c4bb62db

У меня еще есть данные? Можно ли его перемонтировать? Любая помощь могла бы быть полезна

Да, вы стерли диски этой последней командой.

Различное количество MD-устройств связано с тем, что оно основано на разделах, а не на устройстве. Один, вероятно, загрузочный, один корень, одни данные; что-то такое.

Однако, почему у вас есть тома raid1 с 12 компонентами, для меня загадка.

Кстати, вы не должны использовать RAID5 с таким количеством дисков. Поищите в сети, почему RAID не обеспечивает достаточной избыточности при сегодняшней емкости.

И о том, что изначально пошло не так; похоже, недостаточно информации о причине.