This repository has been archived by the owner on Feb 26, 2020. It is now read-only.
SPL sets 0x0 hostid at boot allowing exported pools to be imported on multiple hosts #298
Labels
Milestone
When 90-zfs.rules loads the ZFS modules on boot, SPL gets 0x0 for the hostid.
microcode: CPU5 updated to revision 0x19, date = 2013-06-21
microcode: CPU6 updated to revision 0x19, date = 2013-06-21
microcode: CPU7 updated to revision 0x19, date = 2013-06-21
SPL: Loaded module v0.6.2-1
zunicode: module license 'CDDL' taints kernel.
Disabling lock debugging due to kernel taint
ZFS: Loaded module v0.6.2-1, ZFS pool version 5000, ZFS filesystem version 5
SPL: using hostid 0x00000000
[ OK ]
Setting hostname perf3222: [ OK ]
Setting up Logical Volume Management: No volume groups found
[ OK ]
The result is when pools are exported/imported, they don't contain a hostid and will auto load onto any host which can see the pool.
[root@perf3224 ~]# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
ost0 832G 528K 832G 0% 1.00x ONLINE -
[root@perf3224 ~]# zdb -C ost0
MOS Configuration:
version: 5000
name: 'ost0'
state: 0
txg: 31
pool_guid: 2315546968093434084
hostname: 'perf3222'
vdev_children: 1
Loading the modules after boot will pick up the hostid.
[root@perf3224 ~]# modprobe zfs
[root@perf3224 ~]# zpool list
no pools available
perf3224 login: SPL: Loaded module v0.6.2-1
zunicode: module license 'CDDL' taints kernel.
Disabling lock debugging due to kernel taint
ZFS: Loaded module v0.6.2-1, ZFS pool version 5000, ZFS filesystem version 5
SPL: using hostid 0xa696e02b
And new we have hostids written.
[root@perf3224 ~]# zdb -C ost0
MOS Configuration:
version: 5000
name: 'ost0'
state: 0
txg: 431
pool_guid: 2315546968093434084
hostid: 2794905643
hostname: 'perf3224'
vdev_children: 1
Running code:
[root@perf3222 ~]# rpm -qa | grep zfs
zfs-dkms-0.6.2-1.el6.noarch
dkms-2.2.0.3-14.zfs1.el6.noarch
zfs-release-1-3.el6.noarch
zfs-0.6.2-1.el6.x86_64
[root@perf3222 ~]# uname -a
Linux perf3222 2.6.32-358.18.1.el6.x86_64 #1 SMP Fri Aug 2 17:04:38 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@perf3222 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
The text was updated successfully, but these errors were encountered: