hostid generation should be more "predictable"
hostids are re-generated on the fly whenever an x86 system boots but lacks an /etc/hostid file. (For sparc they are taken from the idprom.)
We can and should try to use SMBIOS ids on systems that have them, and use that to generate predictable hostids. This will help systems that don't have persistent storage (e.g. RAM based root disks).
Modern systems have "unique" SMBIOS ids. Some older systems don't, so there needs to be a way to override this. Also, there should be a "black list" of known "bad" SMBIOS uuids.
Sadly the SMBIOS is 128-bits, while the hostid is only 32-bits. Still, we believe that using a hash of the SMBIOS can generate 32-bits that appear generally to be random (so no worse than the existing algorithm), while being stable across reboots even when /etc/hostid is not persistent.
This is important for ZFS, which uses hostids to check for imports from wrong systems, etc. Eliminating this problem may reduce the number of dangerous and incorrect uses of zpool import -f.
Updated by Garrett D'Amore almost 8 years ago
- Category set to kernel
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Tags deleted (
Author: Garrett D'Amore <email@example.com>
Date: Sat Nov 17 00:50:53 2012 -0800
3359 hostid generation should be more "predictable"
Reviewed by: Andy Giles <firstname.lastname@example.org>
Reviewed by: Hans Rosenfeld <email@example.com>
Reviewed by: Richard Elling <firstname.lastname@example.org>
Approved by: Richard Lowe <email@example.com>