我有两个 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 中。Raid 工作正常。以下是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...
答案1
我找到了这个问题的原因。我安装了 LVM,并dolvm
在 grub.cfg 中添加了标志,一切开始正常工作。(我domdadm
已经在 grub.cfg 中添加了标志)