[zfs-discuss] ZPOOL import dangerous bug in the latest 6.5.4-1
v.konoplev at cosmos.ru
Mon Feb 15 04:13:53 EST 2016
I think that the behavior bellow also results from the general problem:
trying to utilize the fuzzy linux's hostid concept (inherited from
Solaris) which is not suitable here.
Just one of many examples: in some cases hostid has a meaning of "main"
IP address of the system (depending on its hostname). Consistently it
should be 4 bytes long only. But this is not yet the main problem. In
that case hostid can not be properly defined before network subsystem is
started. This results some troubles, e.g. If one wants to use ZFS for
the root partition. Also If you want to use random value stored in
/etc/hostid it will be some other hostid from the origin meaning of
hostid as IP address of hostname.
As far as I can see, problems with hostid arises from time to time in
ZOL. They are patched and arises again. And I do not understand why
developers keep It.
14.02.2016 6:25, Richard Laager пишет:
> On 02/12/2016 02:01 PM, Chris Siebenmann wrote:
>> as far as I can see, the hostid is eight bytes, not four.
>> [*: specifically it is ZPOOL_CONFIG_HOSTID aka "hostid", which is
>> defined as an unsigned 64-bit int.]
> While ZPOOL_CONFIG_HOSTID is 64-bits, spl only ever returns 32-bits from
> /etc/hostid. See module/spl/spl-generic.c, specifically the end of
> Setting a 64-bit hostid on the kernel command-line (spl.spl_hostid) also
> results in it being truncated to 32-bits. I'm not 100% sure where that's
> happening, but I confirmed it by testing.
More information about the zfs-discuss