Adding DAS to /etc/fstab

You may want to automatically mount your DAS during reboots (e.g., `reboot`, `shutdown -r`, `systemctl reboot`). In these cases, the host will not be released and your DAS will remain intact. However, for safety purposes we recommend using the following `/etc/fstab` entry.

# device    mount                           fs-type      options                                       dump pass
/dev/vdc    /home/ubuntu/direct-attached    ext4         defaults,nofail,x-systemd.device-timeout=5    0    2

Explanation

  • device -`/dev/vdc`

  • mount - `/home/ubuntu/direct-attached` (example)

  • fs-type - ext4 (example)

  • options:

    • defaults - start with the filesystem defaults

    • no-fail - DAS volume cannot block system boot

    • x-systemd.device-timeout=5 - only wait 5s on filesystem during boot

  • dump (0) - do not run backup

  • pass (2) - run fsck after boot

The `no-fail` and `x-systemd.device-timeout=5` options are particularly important since stopping and restarting a VM on another host would cause mounting the DAS to fail and block the VM boot process. Make sure not to set the timeout to 0, as this translates to infinite timeout.

Tip

To validate your `/etc/fstab` changes run a `mount -a` before trying a reboot.

Last updated