[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:
demmm 2022-10-16 12:22:45 +02:00
parent db20b79ac0
commit 1b96832bf7

View File

@ -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
ZfsResult zfsResult;
if ( encrypt )