[Pkg-zfsonlinux-devel] Comparing the Debian and Ubuntu version of spl-linux
Turbo Fredriksson
turbo at bayour.com
Thu Sep 29 12:45:33 UTC 2016
On Sep 29, 2016, at 9:44 AM, Petter Reinholdtsen wrote:
> Unless one pivot_root to a tmpfs during shutdown
Pivot it to what? That will mean we'll have to create _a second_ (ch)root
image, so that we can run 'zpool export' (and whatever else we might
need to do).
It's going to be a lot of things to maintain, and I'm not sure it's
worth it, just to keep the hostid crap. There's simpler ways to solve
the problem - we need to understand what the problem actually IS before
we try to "solve it".
The problem, as I see it, is that we want (??) to make sure that a
pool isn't imported on multiple machines simultaneous.
This can be solved by specifically specifying WHAT pool to import in
the /etc/default/zfs file. Or what pool NOT to import (same file).
> Right. Is there a way we can mark the pool read-only during shutdown,
> or something similar that make it easier to accept it during boot?
No. You can't 'remount' a pool. Because it's not mounted. It's imported.
And you can't 'reimport' the pool without first exporting it and then
import it with '-o readonly=on'.
Well, it _MIGHT_ (!!) be possible to 'zpool set readonly=on mypool', but
if I remember correctly, that does not change/set the hostid in the
pool..
> How did you mitigate it?
ZPOOL_IMPORT_ALL_VISIBLE='no'
ZFS_POOL_IMPORT='mypool'
ZPOOL_CACHE=''
ZFS_POOL_EXCEPTIONS='notmypool'
Read the comments in /etc/default/zfs for more about these.
--
Att tänka innan man talar, är som att torka sig i röven
innan man skiter.
- Arne Anka
More information about the Pkg-zfsonlinux-devel
mailing list