RAIDアレイをマウントできないのはなぜですか?

RAIDアレイをマウントできないのはなぜですか?

私はRAIDアレイを持っており、正しく理解すると正常に動作するようです。

# cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md127 : active raid1 sdc1[0] sdb1[2]
      1951427392 blocks super 1.2 [2/2] [UU]
      
unused devices: <none>

そして:

# mdadm -D /dev/md127
/dev/md127:
           Version : 1.2
     Creation Time : Mon Jun 30 11:34:10 2014
        Raid Level : raid1
        Array Size : 1951427392 (1861.03 GiB 1998.26 GB)
     Used Dev Size : 1951427392 (1861.03 GiB 1998.26 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Mon Sep 13 22:35:53 2021
             State : clean 
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

Consistency Policy : resync

              Name : vm1:0  (local to host vm1)
              UUID : 0db83822:c53b4237:6ad8219b:40bc9f1c
            Events : 119625

    Number   Major   Minor   RaidDevice State
       0       8       33        0      active sync   /dev/sdc1
       2       8       17        1      active sync   /dev/sdb1

しかし、これを行うと:

# mount /dev/md127 /data/

これにより、何も起こらず、システムログに次のメッセージが表示されます。

systemd[1]: media-storage.mount: Unit is bound to inactive unit dev-md0.device. Stopping, too.
systemd[1]: Unmounting /data...
systemd[1]: media-storage.mount: Succeeded.
systemd[1]: Unmounted /data.

実行すると、fdisk次の出力が表示されます。

# fdisk -l
Disk /dev/sda: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: SanDisk SDSSDXPS
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x98ee38b9

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048 466862079 466860032 222.6G 83 Linux
/dev/sda2       466864126 468860927   1996802   975M  5 Extended
/dev/sda5       466864128 468860927   1996800   975M 82 Linux swap / Solaris


Disk /dev/sdb: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: ST2000DM001-1ER1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xe4628c28

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdb1             2048 3903119359 3903117312  1.8T fd Linux raid autodetect
/dev/sdb2       3903119360 3907024895    3905536  1.9G 82 Linux swap / Solaris


Disk /dev/sdc: 1.82 TiB, 2000397852160 bytes, 3907027055 sectors
Disk model: ST2000VX000-1CU1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x000ccc21

Device     Boot      Start        End    Sectors  Size Id Type
/dev/sdc1             2048 3903119359 3903117312  1.8T fd Linux raid autodetect
/dev/sdc2       3903119360 3907024895    3905536  1.9G 82 Linux swap / Solaris


Disk /dev/md127: 1.82 TiB, 1998261649408 bytes, 3902854784 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

次の形式で表示されます/dev/md127

# mkfs /dev/md127
mke2fs 1.46.2 (28-Feb-2021)
/dev/md127 contains a ext4 file system
    last mounted on /data on Mon Sep 13 22:35:53 2021
Proceed anyway? (y,N)
  1. ここで何が起こっているのでしょうか?
  2. システムログの最初の行にデバイスがmd0代わりに記載されているのはなぜですかmd127
  3. どうすれば解決できますか?

ベストアンサー1

「非アクティブデバイスdev-md0.deviceにバインドされたデバイス」。メッセージ、特に他のデバイス名を参照しているという事実を見ると、systemdが何とか壊れていると思うでしょう。検索で私が思ったことを確認し、基本的に解決策を提供しました。

  1. マウントポイントを再作成
  2. 走るsystemctl daemon-reload

(検索して発見したページは次のとおりです。https://databaseinaction.com/article/systemd-unit-awscsrdb-mount-is-bound-to-inactive-unit-dev-nvme8n1-device-stopping-too/)

ステップ1がどのように変わるかはわかりませんが、systemdを理解すると主張しません。

おすすめ記事