Hi, On 3/14/19 6:54 PM, Michal Soltys wrote: > On 3/14/19 5:21 PM, Hans van Kranenburg wrote: >> On 3/14/19 5:17 PM, Michal Soltys wrote: >>> On 3/14/19 5:09 PM, Michal Soltys wrote: >>>> On 3/14/19 4:57 PM, Hans van Kranenburg wrote: >>>>> On 3/14/19 4:44 PM, Michal Soltys wrote: >>>>>> >>>>>> <cut> >>>>>> >>>>>> Occasionally, during reboots (all of them clean of course) I get: >>>>>> >>>>>> devid 2 uuid <uuid> is missing >>>>>> failed to ready system array: -2 >>>>>> open_ctree faield >>>>>> >>>>>> Which drops me into initramfs commandline. >>>>> >>>>> It might try to mount before all disks are visible. This can happen when >>>>> e.g. a raid controller needs a little bit more time to initialize. >>>>> >>>>> Try adding rootdelay=10 to your linux command line, or any other number, >>>>> and then look at logging when booting (so no quiet on your linux command >>>>> line). >>>>> >>>> >>>> It remains unmountable from initramfs's commandline with both disks >>>> (partitions) present. Filesystem is mounted formally via uuid, so it >>>> needs both disks present before udev/blkid can pick the correct devices. >> >> When using UUID in fstab/initramfs, all btrfs devices show up having the >> same UUID, so if any of them is present, it can try mounting. >> >>> E.g. >>> >>> mount /dev/sdr2 /newroot -> fails >> >> Are you typing this manually? And what's the error? Does it complain >> about the devid of sds2? > > Yes.
Did you try rootdelay? The stuff below looks like it tried mounting too soon indeed. > Output captured via serial console (debug level) below. > >> >>> mount /dev/sds2 /newroot -> ok >> >> While doing this you trigger the system to have a look, and at that >> moment it will suddenly discover the disk, and now it sees them both and >> it mounts... >> >>> umount /newroot >>> mount /dev/sdr2 /newroot -> ok >> >> ...even when using sdr2, because when doing the things above all disks >> got discovered. >> >> It's of course possible you have another problem.My suggestion was just >> a been-there-done-that. But, in that case posting more logging might help. >> > > [ 25.579637] md127: detected capacity change from 0 to 5401587744768 > [ 25.728050] PM: Image not found (code -22) > [ 25.779465] BTRFS: device label xs22_root devid 1 transid 25364 /dev/sds2 /dev/sds2 is available, a mount is attempted... > [ 25.810606] BTRFS info (device sds2): disk space caching is enabled > [ 25.841015] BTRFS info (device sds2): has skinny extents > [ 25.870085] BTRFS error (device sds2): devid 2 uuid > c93d387c-1acc-4bea-aeae-59a440ac7991 is missing > [ 25.903337] BTRFS error (device sds2): failed to read the system array: -2 > [ 25.957884] BTRFS error (device sds2): open_ctree failed ...which fails because devid 2 can't be found. > [ 26.002614] printk: systemd-udevd: 53 output lines suppressed due to > ratelimiting > > > BusyBox v1.22.1 (Debian 1:1.22.0-19+b3) built-in shell (ash) > Enter 'help' for a list of built-in commands. Here... > (initramfs) mount /dev/sds2 /root > [ 42.638417] BTRFS info (device sds2): disk space caching is enabled > [ 42.673164] BTRFS info (device sds2): has skinny extents > [ 42.706947] BTRFS error (device sds2): devid 2 uuid > c93d387c-1acc-4bea-aeae-59a440ac7991 is missing > [ 42.743085] BTRFS error (device sds2): failed to read the system array: -2 > [ 42.789905] BTRFS error (device sds2): open_ctree failed > mount: mounting /dev/sds2 on /root failed: Invalid argument ...the same happens again. devid 2 is not in the picture yet. But now... > (initramfs) mount /dev/sdr2 /root > [ 54.216006] BTRFS: device label xs22_root devid 2 transid 25364 /dev/sdr2 ...you explicitly point to /dev/sdr2, which triggers having a look at it and it is discovered as being a btrfs block device. Now the mount succeeds: > [ 54.249603] BTRFS info (device sds2): disk space caching is enabled > [ 54.281158] BTRFS info (device sds2): has skinny extents > [ 54.318920] BTRFS info (device sds2): enabling ssd optimizations > [ 54.352494] BTRFS info (device sds2): checking UUID tree And after this... > (initramfs) umount /root ...they're both still visible, so any other mount pointing at any of the two succeeds. > (initramfs) mount /dev/sds2 /root > [ 63.458869] BTRFS info (device sds2): disk space caching is enabled > [ 63.490016] BTRFS info (device sds2): has skinny extents > [ 63.529345] BTRFS info (device sds2): enabling ssd optimizations > Hans