[zfs] Add delay before creating the zpool

This commit is contained in:
dalto 2021-11-06 14:12:40 -05:00
parent 7635b76352
commit 7f05096611

View File

@ -79,8 +79,9 @@ ZfsJob::exec()
}
// Create the zpool
// zfs doesn't wait for the devices so pause for 2 seconds to ensure we give time for the device files to be created
auto r
= system->runCommand( { "sh", "-c", "zpool create " + m_poolOptions + " " + m_poolName + " " + deviceName },
= system->runCommand( { "sh", "-c", "sleep 2 ; zpool create " + m_poolOptions + " " + m_poolName + " " + deviceName },
std::chrono::seconds( 10 ) );
if ( r.getExitCode() != 0 )
{