Mercurial > illumos > illumos-gate
changeset 4178:ad95fd86760b
6553537 zfs root fails to boot from a snv_63+zfsboot-pfinstall netinstall image
author | lling |
---|---|
date | Mon, 07 May 2007 16:01:39 -0700 |
parents | 05e097768c5d |
children | eda5b96b10d3 |
files | usr/src/uts/common/fs/zfs/spa.c usr/src/uts/common/fs/zfs/spa_config.c |
diffstat | 2 files changed, 6 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/fs/zfs/spa.c Mon May 07 11:20:02 2007 -0700 +++ b/usr/src/uts/common/fs/zfs/spa.c Mon May 07 16:01:39 2007 -0700 @@ -589,7 +589,8 @@ ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); - if ((unsigned long)hostid != myhostid) { + if (hostid != 0 && myhostid != 0 && + (unsigned long)hostid != myhostid) { cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " "another system (host: %s hostid: 0x%lx). "
--- a/usr/src/uts/common/fs/zfs/spa_config.c Mon May 07 11:20:02 2007 -0700 +++ b/usr/src/uts/common/fs/zfs/spa_config.c Mon May 07 16:01:39 2007 -0700 @@ -294,8 +294,10 @@ VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_POOL_GUID, spa_guid(spa)) == 0); (void) ddi_strtoul(hw_serial, NULL, 10, &hostid); - VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID, - hostid) == 0); + if (hostid != 0) { + VERIFY(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID, + hostid) == 0); + } VERIFY(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME, utsname.nodename) == 0);