From owner-freebsd-current@freebsd.org Sat Dec 5 21:15:18 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C854B4A8648 for ; Sat, 5 Dec 2020 21:15:18 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CpMmQ0r5mz4htn; Sat, 5 Dec 2020 21:15:17 +0000 (UTC) (envelope-from etnapierala@gmail.com) Received: by mail-wm1-x32b.google.com with SMTP id v14so8264686wml.1; Sat, 05 Dec 2020 13:15:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=xd1g/dsCSluyDPh/0FXhp1VsWp7+gQhOXgZxuci/D4w=; b=U4w6tNhTM1aSQ2WwxmnoK3CT0XT97oRVm5x+5+zL5VjaSA0JqrRjHM7jS1zjD0q0Td bGoxT3mD8aLcC4bT7J3UoiJeUfisQVIK4e2+93KruK4uCZvbjgjhO89jc1M1GN//ZXE/ eVYNO2rUrtHuhZ6sz7orn3iQjf78Nrq8U4MTMmGnXPHSfNWJ98Serjlg8k/Biq0C++Xj OVlSNwzriiwY5aBA+IhAfQlDIholN9iV1NcNlLmDEKRkcOAlfdCmPnU8vfoUpIwNqFVR AbfQgdsL3h0MeHIq24i3JkoUZZwPs5IJMYTjCMQvbMykF30EVAX8kREa4moh1o5LUE5t kXWA== X-Gm-Message-State: AOAM531Ib7HwyNJGCNxwf3jU2Ert5toc4GKtPfIFi+mm7NrbeaZAxPz6 2YHtIqZdOolJnt0KlMHnhIWk0N7wrOuatg== X-Google-Smtp-Source: ABdhPJyoZJ/3or0Iv1AEkeOq7y5Abi9mIeKciZp1jfmsISc0n+4YdYD6swV+ppOaIoWrE5h922daXQ== X-Received: by 2002:a05:600c:2652:: with SMTP id 18mr10576073wmy.54.1607202915175; Sat, 05 Dec 2020 13:15:15 -0800 (PST) Received: from brick (cpc159423-cmbg20-2-0-cust338.5-4.cable.virginm.net. [86.7.147.83]) by smtp.gmail.com with ESMTPSA id q12sm8181543wmc.45.2020.12.05.13.15.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 05 Dec 2020 13:15:13 -0800 (PST) Sender: =?UTF-8?Q?Edward_Tomasz_Napiera=C5=82a?= Date: Sat, 5 Dec 2020 21:15:13 +0000 From: Edward Tomasz =?utf-8?Q?Napiera=C5=82a?= To: Ian Lepore Cc: Ronald Klop , FreeBSD Current Subject: Re: rc.d/zpool runs before ada(4) attaches Message-ID: Mail-Followup-To: Ian Lepore , Ronald Klop , FreeBSD Current References: <1439301337.11.1606815206810@localhost> <08815f92-742c-2934-e746-fd04ca9b4e16@omnilan.de> <286917313.21.1606836130991@localhost> <786faeee90e79aa0175b298ec859265ff57a3129.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <786faeee90e79aa0175b298ec859265ff57a3129.camel@freebsd.org> X-Rspamd-Queue-Id: 4CpMmQ0r5mz4htn X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.70 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[trasz@freebsd.org,etnapierala@gmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[86.7.147.83:received]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[trasz@freebsd.org,etnapierala@gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::32b:from]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::32b:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::32b:from]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 Dec 2020 21:15:18 -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.