[zfs] adding hostid
using ZFS in combination with dracut exposed a bug on system updates hostid from the Live session does not match hostid installed, thus zpool id no longer matches id created by dracut in the kernel img to work around this, the zfs module now uses zgenhostid to create a hostid
This commit is contained in:
parent
db20b79ac0
commit
1b96832bf7
@ -241,6 +241,13 @@ ZfsJob::exec()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Generate the zfs hostid file
|
||||||
|
auto i = system->runCommand( { "zgenhostid" }, std::chrono::seconds( 3 ) );
|
||||||
|
if ( i.getExitCode() != 0 )
|
||||||
|
{
|
||||||
|
cWarning() << "Failed to create /etc/hostid";
|
||||||
|
}
|
||||||
|
|
||||||
// Create the zpool
|
// Create the zpool
|
||||||
ZfsResult zfsResult;
|
ZfsResult zfsResult;
|
||||||
if ( encrypt )
|
if ( encrypt )
|
||||||
|
Loading…
Reference in New Issue
Block a user