1

I have two sata disks: /dev/sda and /dev/sdb. I have 4 partitions:

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

And all of them are in raid1. Raid is working fine. Here is 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>

And my problem is: After boot my root partition is in readonly mode:

/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)

AND There is no /dev/md127 in /dev directory:

# 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

In dmesg I get this message:

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

Do you have any idea what can be wrong?

EDIT: All errors from 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...
Krzysztof Miksa
  • 161
  • 1
  • 7
  • Look through the `dmesg` output for other errors or messages that might be related. – Michael Hampton Dec 14 '17 at 23:28
  • I posted all dmesg errors. Unfortunately the only one which I get is: `inotify_add_watch(7, /dev/md127, 10) failed: No such file or directory`. The most interesting thing is that why /home device is visible in /dev/ but root / is not. – Krzysztof Miksa Dec 15 '17 at 09:26

1 Answers1

1

I found the reason of this problem. I installed LVM and I added dolvm flag to grub.cfg and everything started working properly. (I had domdadm flag already added to grub.cfg)

Krzysztof Miksa
  • 161
  • 1
  • 7
  • Yes. Since this was about your root filesystem, it - and the RAID set it is located on - must be activated within initramfs/initrd, but this wasn't happening correctly. Since you did not explicitly say which distribution this is, and the question has both "ubuntu" and "gentoo" tags, it would have been hard to give more specific advice. – telcoM Dec 19 '17 at 08:31