Re: rc.d/zpool runs before ada(4) attaches

From: Edward Tomasz Napierała <trasz_at_freebsd.org>
Date: Sat, 5 Dec 2020 21:15:13 +0000
On 1201T0834, Ian Lepore wrote:
> On Tue, 2020-12-01 at 16:22 +0100, Ronald Klop wrote:

[..]

> > You can define these in /boot/loader.conf:
> > #kern.cam.boot_delay="10000" # Delay (in ms) of root mount for CAM
> > bus
> > #kern.cam.scsi_delay="2000" # Delay (in ms) before probing SCSI
> > 
> > Maybe that helps.
> > 
> > Ronald.
> > 
> 
> Those settings control waiting before mounting root.  Harry's problem
> is that root is mounted quickly, before other drives are ready for zfs.
>  
> The zpool script waits for 'disks'.  It would be nice if the cam
> subsystem had something like a sysctl it set to indicate when initial
> probing for disks was done, then there could be an rc.d/camprobe script
> with 'PROVIDE: disks' which waits for the probing to complete.

I believe such a mechanism already exists, although it might be somewhat
misnamed: the vfs.root_mount_hold sysctl.  Some rc scripts use the
root_hold_wait() function, which uses the sysctl.  Perhaps the ZFS
scripts should do the same?

Note that this is somewhat more involved than just CAM - you also need
to wait for GEOM to settle.
Received on Sat Dec 05 2020 - 20:15:18 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:26 UTC