]> git.proxmox.com Git - mirror_spl-debian.git/commit - debian/changelog
Stabilize the hostid for the zfs-initramfs package.
authorDarik Horn <dajhorn@vanadac.com>
Fri, 11 Mar 2011 20:49:05 +0000 (14:49 -0600)
committerDarik Horn <dajhorn@vanadac.com>
Fri, 11 Mar 2011 21:12:41 +0000 (15:12 -0600)
commit5702dc92cb57c4bf88b4d010f1c47c9797353103
treef34c19447fa0a3094ff75d4f9e105644be7f4789
parent867f6966a065803efc73a2e2271b4678c1088aa4
Stabilize the hostid for the zfs-initramfs package.

The hostname and hostid of the last system to access a ZFS pool are stored in
the ZFS pool itself.  A pool is foreign if, during `zfs import`, the current
hostname and hostid are different than the stored values thereof.

The hostname and hostid on Solaris are intrinsic, but they are not on Linux,
so the spl kernel module invokes /bin/hostname and /usr/bin/hostid from the
userland in its initialization routine.

However, these two indentifiers are usually undefined in the Linux initramfs
environment, so the /etc/hostname and /etc/hostid files must be added to the
initrd.  Things like a DHCP lease change can affect the hostid too.

ZFS requires stable values for hostname and hostid, but basic Linux systems
do not.  The hostid is therefore stabilized by creating the /etc/hostid file
in the regular environment if it does not already exist.  An undefined
hostname is usuallly stable.

Neither /etc/hostname nor /etc/hostid are controlled configuration files in
Debian distributions, but the spl package nevertheless installs a dummy
/etc/hostid file that contains the HW_INVALID_HOSTID sentinal value so that
the package manager will track it.
debian/changelog
debian/rules
debian/spl.install
debian/spl.postinst [new file with mode: 0644]