Directory storage not mounted on boot

claytonjn

Member
Dec 27, 2019
2
0
21
35
I have an xfs storage directory configured - nine times out of ten when the server is rebooted the directory doesn't mount and any VMs or CTs that use that storage fail to start. if I run systemctl status mnt-pve-storage.mount I get the following:
Bash:
● mnt-pve-storage.mount - Mount storage 'storage' under /mnt/pve
   Loaded: loaded (/etc/systemd/system/mnt-pve-storage.mount; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Fri 2019-12-27 15:03:24 EST; 1min 42s ago
    Where: /mnt/pve/storage
     What: /dev/disk/by-uuid/ad61ac31-7d4a-4fcb-8ec5-1df3c8b3ce5e
  Process: 1145 ExecMount=/bin/mount /dev/disk/by-uuid/ad61ac31-7d4a-4fcb-8ec5-1df3c8b3ce5e /mnt/pve/storage -t xfs -o defaults (code=exited, status=32)
      CPU: 4ms

Dec 27 15:03:24 mystique systemd[1]: Mounting Mount storage 'storage' under /mnt/pve...
Dec 27 15:03:24 mystique systemd[1]: mnt-pve-storage.mount: Mount process exited, code=exited status=32
Dec 27 15:03:24 mystique systemd[1]: Failed to mount Mount storage 'storage' under /mnt/pve.
Dec 27 15:03:24 mystique systemd[1]: mnt-pve-storage.mount: Unit entered failed state.

If I run systemctl start mnt-pve-storage.mount after boot the storage properly mounts.

Any tips on how to get this to work properly so that I don't have to manually mount the directory storage every boot? Thanks!
 
I set it up through the web interface (node>Disks>Directory>Create: Directory), apparently that uses systemd.
 
I set it up through the web interface (node>Disks>Directory>Create: Directory), apparently that uses systemd.

I guess you installed off the ProxMox iso , i myself installed from Debian Buster and then moved to Proxmox, so i set up local storage by hand (and in /etc/fstab :)

To get back to the issue this seems like a timing thing, as i had similar issues with shared storage i solved it by adding a dependancy-line in the pve-guests unitfile

if you are willing to try you could try to implement the following changes :

IF wanting to stick to the systemd way of mounting the disk :

Edit the mnt-pve-storage.mount - unitfile , add the following lines (if not present):

  • Restart=always
  • RestartSec=15s
This will set a restart interval (if it fails) for 15 seconds, untill its successfully started.

Edit the pve-guests unitfile and add a dependancy :
  • After=mnt-pve-storage.mount
This will prevent Guests to try and start without the underlying storage to be available.

From my perspective this will hold till an update comes around which will over- or rewrite the systemd unitfile (out of experience)

if you were to transfer this to /etc/fstab it will stick and be part of the system-startup

this means you will need to edit /etc/fstab and add a line :

UUID=ad61ac31-7d4a-4fcb-8ec5-1df3c8b3ce5e /mnt/pve/storage xfs defaults 0 0


Personally i am not that fond of hooking up storage under /mnt/pve/* , i create /data/* as it guarantees it will never collide with possible in-use ProxMox mounts on it.

On my machines (for local storage) i started out with references in /etc/fstab (set up before moving to proxmox on Debian:

UUID=66eefae3-a7c1-4010-b172-008ec230effb /data/iso xfs defaults 0 0 UUID=0aae94cb-eb7b-4844-908d-0d04f78cd0ab /data/vms xfs defaults 0 0 UUID=68c587c0-4e85-4be4-8df1-fbe7a3dd1279 /data/backup xfs defaults 0 0

As you can see the assignments reflect the type of whats in the storage ( all are lvm volumes)

Hope this gives some insight and tips :)
 
Last edited: