From owner-freebsd-current@freebsd.org Tue Dec 1 20:47:36 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 C9D9F4B4823 for ; Tue, 1 Dec 2020 20:47:36 +0000 (UTC) (envelope-from osidorkin@gmail.com) Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) (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 4ClvLH6N9nz4sWM for ; Tue, 1 Dec 2020 20:47:35 +0000 (UTC) (envelope-from osidorkin@gmail.com) Received: by mail-qt1-x833.google.com with SMTP id u21so2214483qtw.11 for ; Tue, 01 Dec 2020 12:47:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=fZgBoi9faalA/JZV6KHwkpoUwKWEfUDF6EuZZGUj9Cc=; b=D0BQDpMji3Xpvp0aSpmvUIEZA0aqJ5NRvyt5DOBETCodl5kCNrhAg7y4/xuMuclrJm PuWDHaEYRFU1oLtM349DXOfTm0A+T3nNIQrsGTrWv0d9O20L9J1j9knUy8l77b1e6Pu0 /pOp5WL0p1Cacb4ZjshIgezGT29PEJpbFWWMCb2vAwVoLV1/xQZXBGqbJfsuMAyiKxMo 1iuQwN0oYuG/8xNgkAemUrU2UwhBRKC2j3giPfqFCFyeVD1rbeldCA/lvZmNl0mDNkE6 gqTCKNGyEDJh9MMEcOAKVdeFSOFiYKTg6etvnWSnywkK2Ea59jAMjdJbO2YLGB65sTIn iPgw== X-Gm-Message-State: AOAM530EkjMgGNDlOQFtf/n0NUXrrVp6l8ZmMlSx52BvxP/AsLQFJjUS KHTrNyOTSZR0t2/cnhfIxAt18VLkoGMDj4pEPb7GrpGaW11Eng== X-Google-Smtp-Source: ABdhPJyOynLvw3vdYllovC8S4QhO0dzY7VSZ+iqpyxvXMCsMonXjgC6CJ6v7uvfHyWEn/Xhy3wrExklgPHLJlbbpaBk= X-Received: by 2002:ac8:4908:: with SMTP id e8mr4860318qtq.10.1606855654741; Tue, 01 Dec 2020 12:47:34 -0800 (PST) MIME-Version: 1.0 References: <1439301337.11.1606815206810@localhost> <08815f92-742c-2934-e746-fd04ca9b4e16@omnilan.de> <286917313.21.1606836130991@localhost> <786faeee90e79aa0175b298ec859265ff57a3129.camel@freebsd.org> In-Reply-To: From: Oleg Sidorkin Date: Tue, 1 Dec 2020 23:47:23 +0300 Message-ID: Subject: Re: rc.d/zpool runs before ada(4) attaches To: freebsd-current@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4ClvLH6N9nz4sWM X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::833:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; 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)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::833:from:127.0.2.255]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::833:from]; RCVD_COUNT_TWO(0.00)[2]; 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: Tue, 01 Dec 2020 20:47:36 -0000 Tue, 1 Dec. 2020 =D0=B3. =D0=B2 23:24, tech-lists : > > On Tue, Dec 01, 2020 at 08:34:33AM -0700, 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=3D"10000" # Delay (in ms) of root mount for CAM > >> bus > >> #kern.cam.scsi_delay=3D"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. > > > >-- Ian > > kern.cam.boot_delay should still fix it because what is required is a del= ay > while the devices (all of the disks, zfs or not) get ready. Because root > has to happen before disks/zfs. > -- > J. I've reported a similar problem here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D242189 some time ago. I just added the patch that solves it for me by delaying startup until CAM and USB scan is complete (that's overkill probably). --=20 Oleg Sidorkin