Linux

/dev/ 中缺少 RAID 設備

  • December 19, 2017

我有兩個 sata 磁碟:/dev/sda 和 /dev/sdb。我有 4 個分區:

/dev/sd[ab]1 /boot
/dev/sd[ab]2 swap
/dev/sd[ab]3 /
/dev/sd[ab]4 /home

他們都在raid1中。突襲工作正常。這是cat /proc/mdstat

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] 
md124 : active raid1 sda4[0] sdb4[1]
     854995584 blocks [2/2] [UU]
     bitmap: 0/7 pages [0KB], 65536KB chunk

md125 : active raid1 sda1[0] sdb1[1]
     131008 blocks [2/2] [UU]

md126 : active raid1 sda2[0] sdb2[1]
     16777152 blocks [2/2] [UU]

md127 : active raid1 sda3[0] sdb3[1]
     104857536 blocks [2/2] [UU]

unused devices: <none>

我的問題是:啟動後我的根分區處於只讀模式:

/dev/md127 on / type ext4 (ro,relatime,data=ordered)
/dev/md125 on /boot type ext2 (rw,relatime,errors=continue,user_xattr,acl)
/dev/md124 on /home type ext4 (rw,relatime,data=ordered)

並且 /dev 目錄中沒有 /dev/md127:

# ls -l /dev/md1*
brw-rw---- 1 root disk 9, 124 12-14 23:36 /dev/md124
brw-rw---- 1 root disk 9, 125 12-14 23:36 /dev/md125
brw-rw---- 1 root disk 9, 126 12-14 23:36 /dev/md126

在 dmesg 我收到這條消息:

[   12.330196] udevd[2979]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory

你知道有什麼問題嗎?

編輯:來自 dmesg 的所有錯誤:

[   11.162467] cgroup: cgroup2: unknown option "nsdelegate"
[   12.546831] udevd[3023]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory
[   12.770408] udevd[3005]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory
[   12.773312] udevd[3005]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory
[   12.793243] udevd[3022]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory
[   12.794448] udevd[3022]: inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory
[   12.962604] Error: Driver 'pcspkr' is already registered, aborting...

我找到了這個問題的原因。我安裝了 LVMdolvm並向 grub.cfg 添加了標誌,一切都開始正常工作。(我domdadm已經在 grub.cfg 中添加了標誌)

引用自:https://serverfault.com/questions/888231