mdadm - アレイを起動するのに十分ではありません。

mdadm - アレイを起動するのに十分ではありません。

http/ssh アクセスに応答しない MyBookLiveDuo 3TB*2 RAID1 設定からデータを回復しようとしています。ケースからドライブを取り出し、SATA経由でLinuxノートブックに接続しました。私は以下を実行しました。

dmesgは/ dev / sdcと言います:

[125141.929807] ata4: exception Emask 0x10 SAct 0x0 SErr 0x4040000 action 0xe frozen
[125141.929811] ata4: irq_stat 0x00000040, connection status changed
[125141.929813] ata4: SError: { CommWake DevExch }
[125141.929827] ata4: hard resetting link
[125147.695101] ata4: link is slow to respond, please be patient (ready=0)
[125151.729658] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[125151.909228] ata4.00: ATA-9: WDC WD30EZRX-00D8PB0, 80.00A80, max UDMA/133
[125151.909231] ata4.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32), AA
[125151.909888] ata4.00: configured for UDMA/133
[125151.925597] ata4: EH complete
[125151.925652] scsi 3:0:0:0: Direct-Access     ATA      WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
[125151.925828] sd 3:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[125151.925830] sd 3:0:0:0: [sdc] 4096-byte physical blocks
[125151.925833] sd 3:0:0:0: Attached scsi generic sg2 type 0
[125151.925971] sd 3:0:0:0: [sdc] Write Protect is off
[125151.925973] sd 3:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[125151.925995] sd 3:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[125152.002603]  sdc: sdc1 sdc2 sdc3 sdc4
[125152.003134] sd 3:0:0:0: [sdc] Attached SCSI disk
[125152.220477] md: bind<sdc4>
[125152.232731] md: bind<sdc3>
[125152.233892] md/raid1:md126: active with 1 out of 2 mirrors
[125152.233912] md126: detected capacity change from 0 to 512741376
[125152.234269]  md126: unknown partition table

sdc4を直接マウントしようとすると機能しません。

$ sudo mount /dev/sdc4 /home/xxx/wdc -t auto
mount: unknown filesystem type 'linux_raid_member'

Mdstat は sdc3 がアクティブであるが、sdc4 は非アクティブであることを示しています。

$ sudo cat /proc/mdstat
Personalities : [linear] [raid1] 
md126 : active (auto-read-only) raid1 sdc3[2]
      500724 blocks super 1.0 [2/1] [_U]

md127 : inactive sdc4[0](S)
      2925750264 blocks super 1.0

unused devices: <none>

Parted は、sdc4 にファイルシステムがないことを示します。

$ sudo parted -l
Model: ATA WDC WD30EZRX-00D (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 3      15.7MB  528MB   513MB                primary  raid
 1      528MB   2576MB  2048MB  ext3         primary  raid
 2      2576MB  4624MB  2048MB  ext3         primary  raid
 4      4624MB  3001GB  2996GB               primary  raid

Gdisk "v"(OK)で問題が見つかりませんでした。

$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): FA502922-25C1-4759-AAF8-3D1DDA73F5C4
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 31597 sectors (15.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1         1032192         5031935   1.9 GiB     FD00  primary
   2         5031936         9031679   1.9 GiB     FD00  primary
   3           30720         1032191   489.0 MiB   FD00  primary
   4         9031680      5860532223   2.7 TiB     FD00  primary

Command (? for help): v

No problems found. 31597 free sectors (15.4 MiB) available in 2
segments, the largest of which is 30686 (15.0 MiB) in size.

Command (? for help): q

アセンブルしてスキャンしようとすると、/ dev / sdc3アクティブのみが表示されます。

$ sudo mdadm --stop /dev/md12[567]
mdadm: stopped /dev/md126
mdadm: stopped /dev/md127
$ sudo cat /proc/mdstat
Personalities : [linear] [raid1] 
unused devices: <none>
$ sudo mdadm --assemble --scan
mdadm: /dev/md/MyBookLiveDuo:3 assembled from 1 drive - not enough to start the array.
mdadm: /dev/md/MyBookLiveDuo:2 has been started with 1 drive (out of 2).
mdadm: /dev/md/MyBookLiveDuo:3 assembled from 1 drive - not enough to start the array.
$ sudo cat /proc/mdstat
Personalities : [linear] [raid1] 
md127 : active raid1 sdc3[2]
      500724 blocks super 1.0 [2/1] [_U]

unused devices: <none>

E2fsckはスーパーブロックに誤ったマジックナンバーを表示します。

$ sudo e2fsck /dev/sdc3
e2fsck 1.42.9 (4-Feb-2014)
/dev/sdc3 is in use.
e2fsck: Cannot continue, aborting.


$ sudo e2fsck /dev/sdc4
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
e2fsck: Superblock invalid, trying backup blocks...
e2fsck: Bad magic number in super-block while trying to open /dev/sdc4

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
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>
 or
    e2fsck -b 32768 <device>

$ 

NTFSだと思ってmd127をマウントしようとしますか? ? ?

$ sudo mount /dev/md127 /home/xxx/wdc -t auto
NTFS signature is missing.
Failed to mount '/dev/md127': Invalid argument
The device '/dev/md127' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

/dev/sdc4をさらにマウントしてデータを回復する方法について提案がありますか?

編集1: 次のようにsdc4の出力を確認します。これはRAIDレベル=線形を意味します。

$ sudo mdadm --examine /dev/sdc4
/dev/sdc4:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : 374e689e:3bfd050c:ab0b0dce:2d50f5fd
           Name : MyBookLiveDuo:3
  Creation Time : Mon Sep 16 14:53:47 2013
     Raid Level : linear
   Raid Devices : 2

 Avail Dev Size : 5851500528 (2790.21 GiB 2995.97 GB)
  Used Dev Size : 0
   Super Offset : 5851500528 sectors
          State : clean
    Device UUID : 9096f74b:0a8f2b61:93347be3:6d3b6c1b

    Update Time : Mon Sep 16 14:53:47 2013
       Checksum : 77aa5963 - correct
         Events : 0

       Rounding : 0K

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

以下のようにsdc3の出力を確認してください。 mdstatは、この出力がアクティブであることを示します。これは RAID レベル = RAID1 を意味します。

$ sudo mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : 7c040c5e:9c30ac6d:e534a129:20457e22
           Name : MyBookLiveDuo:2
  Creation Time : Wed Dec 31 19:01:40 1969
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 1001448 (489.07 MiB 512.74 MB)
     Array Size : 500724 (489.07 MiB 512.74 MB)
   Super Offset : 1001456 sectors
          State : clean
    Device UUID : 1d9fe3e3:d5ac7387:d9ededba:88ca24a5

    Update Time : Sun Jul  3 11:53:31 2016
       Checksum : 31589560 - correct
         Events : 101


   Device Role : Active device 1
   Array State : .A ('A' == active, '.' == missing)
$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md126 : active (auto-read-only) raid1 sdc3[2]
      500724 blocks super 1.0 [2/1] [_U]

md127 : inactive sdc4[0](S)
      2925750264 blocks super 1.0

unused devices: <none>

パーティションは次のとおりです。

$ cat /proc/partitions 
major minor  #blocks  name

   8        0 1953514584 sda
   8        1     102400 sda1
   8        2 1953411072 sda2
   8       16 1953514584 sdb
   8       17     248832 sdb1
   8       18          1 sdb2
   8       21 1953263616 sdb5
 252        0 1953261568 dm-0
 252        1 1919635456 dm-1
 252        2   33488896 dm-2
   8       32 2930266584 sdc
   8       33    1999872 sdc1
   8       34    1999872 sdc2
   8       35     500736 sdc3
   8       36 2925750272 sdc4
   9      126     500724 md126

編集2:(他のボックスと異なるRAIDディスク)

同じRAID1方式(2 * 3TBディスク2台)で構成されている他のWDLiveDuoシャーシの良好なディスクを使用してsdc3とsdc4の出力を確認すると、両方に対してRAIDレベル= RAID1と表示されます。したがって、記載されている不良ディスクの場合以上、sdc3 は正しい RAID レベル = RAID1 を示しますが、sdc4 は正しい RAID レベルで構成されていません。 RAIDレベルをRAID1に変更/固定してから、マウントして不良ディスクからデータをインポートする方法はありますか?

$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md126 : inactive sdc4[2](S)
      2925750136 blocks super 1.0

md127 : inactive sdc3[1](S)
      500724 blocks super 1.0

unused devices: <none>
$
$ cat /proc/partitions 
major minor  #blocks  name

   8        0 1953514584 sda
   8        1     102400 sda1
   8        2 1953411072 sda2
   8       16 1953514584 sdb
   8       17     248832 sdb1
   8       18          1 sdb2
   8       21 1953263616 sdb5
 252        0 1953261568 dm-0
 252        1 1919635456 dm-1
 252        2   33488896 dm-2
   8       32 2930266584 sdc
   8       33    1999872 sdc1
   8       34    1999872 sdc2
   8       35     500736 sdc3
   8       36 2925750272 sdc4
$
$ sudo mdadm --examine /dev/sdc3
/dev/sdc3:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : 7c040c5e:9c30ac6d:e534a129:20457e22
           Name : MyBookLiveDuo:2
  Creation Time : Wed Dec 31 19:01:40 1969
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 1001448 (489.07 MiB 512.74 MB)
     Array Size : 500724 (489.07 MiB 512.74 MB)
   Super Offset : 1001456 sectors
          State : clean
    Device UUID : e0963cfc:7ba16214:94e24c90:32988d39

    Update Time : Mon Jul  4 13:20:48 2016
       Checksum : 412bab99 - correct
         Events : 288


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing)
$
$ sudo mdadm --examine /dev/sdc4
/dev/sdc4:
          Magic : a92b4efc
        Version : 1.0
    Feature Map : 0x0
     Array UUID : ac48cc98:1d450838:dd0b0364:61b3168e
           Name : MyBookLiveDuo:3
  Creation Time : Sat Jul  2 19:57:43 2016
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 5851500272 (2790.21 GiB 2995.97 GB)
     Array Size : 2925750136 (2790.21 GiB 2995.97 GB)
   Super Offset : 5851500528 sectors
          State : clean
    Device UUID : 1233b655:2f5fd745:c1c71658:f05af045

    Update Time : Mon Jul  4 13:21:15 2016
       Checksum : b83b08dc - correct
         Events : 54432


   Device Role : Active device 1
   Array State : AA ('A' == active, '.' == missing)
$
$ sudo mdadm --stop /dev/md12[567]
mdadm: stopped /dev/md126
mdadm: stopped /dev/md127
$
$ sudo mdadm --assemble --scan
mdadm: /dev/md/MyBookLiveDuo:3 has been started with 1 drive (out of 2).
mdadm: /dev/md/MyBookLiveDuo:2 has been started with 1 drive (out of 2).
$
$ cat /proc/mdstat 
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md126 : active raid1 sdc3[1]
      500724 blocks super 1.0 [2/1] [_U]

md127 : active raid1 sdc4[2]
      2925750136 blocks super 1.0 [2/1] [_U]

unused devices: <none>
$
$ sudo parted -l /dev/sdc
Model: ATA WDC WD30EFRX-68E (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 3      15.7MB  528MB   513MB                primary  raid
 1      528MB   2576MB  2048MB  ext3         primary  raid
 2      2576MB  4624MB  2048MB  ext3         primary  raid
 4      4624MB  3001GB  2996GB  ext4         primary  raid
Error: /dev/md126: unrecognised disk label                                

Model: Linux Software RAID Array (md)
Disk /dev/md127: 2996GB
Sector size (logical/physical): 512B/4096B
Partition Table: loop

Number  Start  End     Size    File system  Flags
 1      0.00B  2996GB  2996GB  ext4
$
$ sudo gdisk /dev/sdc
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

Command (? for help): p
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): BDE03D26-EB85-4348-A4E0-A229FC01EE93
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 31597 sectors (15.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1         1032192         5031935   1.9 GiB     FD00  primary
   2         5031936         9031679   1.9 GiB     FD00  primary
   3           30720         1032191   489.0 MiB   FD00  primary
   4         9031680      5860532223   2.7 TiB     FD00  primary

Command (? for help): v

No problems found. 31597 free sectors (15.4 MiB) available in 2
segments, the largest of which is 30686 (15.0 MiB) in size.

Command (? for help): q
$
$ sudo mount /dev/md127 /home/xxx/wdc -t ext4
mount: wrong fs type, bad option, bad superblock on /dev/md127,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

ベストアンサー1

出力には、mdadm --examine /dev/sdc4RAIDデバイスがオンラインになっていない理由が表示されます。

 Raid Level : linear

リニアRAIDデバイスを起動するには、RAIDグループ内のすべてのデバイスが必要です。

https://raid.wiki.kernel.org/index.php/RAID_setup#Linear_mode

おすすめ記事