How to Completely Disable the ‘zfs-volume-wait’ Service in Ubuntu Server

In Ubuntu Server environments utilizing the ZFS file system, the zfs-volume-wait.service is a specific systemd unit that acts as a synchronization barrier during the boot sequence. Its purpose is to explicitly pause the boot process and wait until all ZFS volumes (zvols) within the imported zpools have their corresponding device nodes (e.g., /dev/zvol/poolname/volname) fully populated and ready in the /dev directory by udev. While this ensures that dependent services (like iSCSI targets or virtual machines expecting block devices) do not fail upon startup, it can significantly delay the boot time of a server that does not utilize zvols at all, or in environments where the administrator prefers to manage device readiness dynamically.

This guide explains how to completely disable the zfs-volume-wait.service in Ubuntu Server, optimizing the boot sequence for systems that exclusively use ZFS datasets (file systems) rather than block volumes.

Stop and Mask the zfs-volume-wait Service

To ensure systemd completely bypasses this waiting period and proceeds with the boot sequence immediately after pool importation, we must aggressively disable and mask the service.

  1. Log into your Ubuntu Server via SSH using an account with sudo privileges.
  2. First, stop the service if it is currently executing (though its primary action is usually only at boot):
    sudo systemctl stop zfs-volume-wait.service
  3. Next, disable the service to remove it from the default boot target dependencies:
    sudo systemctl disable zfs-volume-wait.service
  4. Finally, to guarantee that the service cannot be accidentally triggered by another ZFS dependency or system update, mask it entirely:
    sudo systemctl mask zfs-volume-wait.service

Verify the Service Lockdown

By masking the service, you have instructed systemd to symlink the unit file to /dev/null, effectively treating it as a black hole. The boot process will no longer pause to wait for zvol udev events.

To verify the lockdown is successful, run the following command to check the status of the service:

systemctl status zfs-volume-wait.service

The output will clearly state that the service is masked. If you reboot the server and analyze the boot sequence using systemd-analyze critical-chain, you will confirm that zfs-volume-wait.service is no longer present in the execution path, shaving precious seconds off the total boot time for your ZFS-backed system.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.