Date: Tue, 12 Mar 2024 16:22:42 -0400 From: Dennis Clarke <dclarke@blastwave.org> To: Alan Somers <asomers@freebsd.org> Cc: current@freebsd.org Subject: Re: ZPool on iSCSI storage not available after a reboot Message-ID: <0ac4f17f-21ab-42f7-91c6-7760f322f819@blastwave.org> In-Reply-To: <CAOtMX2jFUYd803kpeA2%2BnCO71_gV8co6QtGoRBEpuX3n9auNYA@mail.gmail.com> References: <8228ca0c-85a0-4436-aaf4-d2d987e0f5a4@blastwave.org> <CAOtMX2jFUYd803kpeA2%2BnCO71_gV8co6QtGoRBEpuX3n9auNYA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
On 3/12/24 15:41, Alan Somers wrote:
> On Tue, Mar 12, 2024 at 1:28 PM Dennis Clarke <dclarke@blastwave.org> wrote:
.
.
.
.
> Yes, this looks exactly like an ordering problem. zpools get imported
> early in the boot process, under the assumption that most of them are
> local. Networking comes up later, under the assumption that
> networking might require files that are mounted on ZFS. For you, I
> suggest setting proteus's cachefile to a non-default location and
> importing it from /etc/rc.local, like this:
>
> zpool set cachefile=/var/cache/iscsi-zpools.cache proteus
>
> Then in /etc/rc.local:
> zpool import -a -c /var/cache/iscsi-zpools.cache -o
> cachefile=/var/cache/iscsi-zpools.cache
>
That seems to be perfectly reasonable.
I will give that a test right now.
I was messing with the previous zpool called proteus and destroyed it.
Easy enough to re-create :
titan# gpart add -t freebsd-zfs /dev/da0
da0p1 added
titan#
titan# gpart show /dev/da0
=> 40 4294967216 da0 GPT (2.0T)
40 8 - free - (4.0K)
48 4294967200 1 freebsd-zfs (2.0T)
4294967248 8 - free - (4.0K)
titan#
titan# zpool create -O compress=zstd -O checksum=sha512 -O atime=off -o
compatibility=openzfs-2.0-freebsd -o autoexpand=off -o autoreplace=on -o
failmode=continue -o listsnaps=off -m none proteus /dev/da0p1
titan# zpool set cachefile=/var/cache/iscsi-zpools.cache proteus
titan#
titan# ls -lapb /etc/rc.local
ls: /etc/rc.local: No such file or directory
titan# ed /etc/rc.local
/etc/rc.local: No such file or directory
a
zpool import -a -c /var/cache/iscsi-zpools.cache -o
cachefile=/var/cache/iscsi-zpools.cache
.
f
/etc/rc.local
w
92
q
titan#
After reboot ... yes ... this seems to get the job done neatly !
root@titan:~ #
root@titan:~ # zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP
HEALTH ALTROOT
iota 7.27T 321G 6.95T - - 0% 4% 1.00x
ONLINE -
proteus 1.98T 1.03M 1.98T - - 0% 0% 1.00x
ONLINE -
t0 444G 40.8G 403G - - 4% 9% 1.00x
ONLINE -
root@titan:~ #
root@titan:~ # uptime
8:21PM up 3 mins, 1 user, load averages: 0.02, 0.04, 0.01
root@titan:~ #
Looks good.
Thank you very much :)
--
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?0ac4f17f-21ab-42f7-91c6-7760f322f819>
