diff --git a/internal/server/storage/drivers/driver_zfs_volumes.go b/internal/server/storage/drivers/driver_zfs_volumes.go index d87f76ed348..64f3cbeafa7 100644 --- a/internal/server/storage/drivers/driver_zfs_volumes.go +++ b/internal/server/storage/drivers/driver_zfs_volumes.go @@ -1928,7 +1928,11 @@ func (d *zfs) getVolumeDiskPathFromDataset(dataset string) (string, error) { // GetVolumeDiskPath returns the location of a root disk block device. func (d *zfs) GetVolumeDiskPath(vol Volume) (string, error) { - return d.getVolumeDiskPathFromDataset(d.dataset(vol, false)) + // Wait up to 30 seconds for the device to appear. + ctx, cancel := context.WithTimeout(d.state.ShutdownCtx, 30*time.Second) + defer cancel() + + return d.tryGetVolumeDiskPathFromDataset(ctx, d.dataset(vol, false)) } // ListVolumes returns a list of volumes in storage pool.