fstab Configuration for volumes

Xclsd

New Member
Oct 23, 2023
5
0
1
Hey guys

I need some help with configuring automounted drives in proxmox.

Backstory:

I've lately been having some troubles with configuring my storage. Initially I had some mount points at mnt/ and some at mnt/pve/. So I decided to move them all to mnt/pve/. I did this, mounted them and i thought everything was fine. Until I rebooted (and the volumes weren't mounted anymore) and unknowingly everything I copied into /mnt/pve/ just filled my root drive. While copying the files i sensed something was wrong and figured, I need to define automounts in fstab. Now while I was editing fstab, my harddrive got filled and i couldn't do anything anymore, not even save fstab, which resulted in me loosing the file and not beeing able to boot anymore.

After some recovery via ubuntu live usb stick i could setup my fstab file again (with some standard parameters) and my system booted again.
I then proceeded to setup the drives I wanted automounted in fstab:

Code:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/pve/root / ext4 errors=remount-ro 0 1
/dev/pve/swap none swap sw 0 0
proc /proc proc defaults 0 0
UUID=e949a6fb-5db7-4940-b885-e6a119f50800   /mnt/pve/slowvmstorage   ext4   defaults   0 0
#UUID=676aaf88-879c-4459-86ce-292a3c64b791   /mnt/pve/iso   ext4   defaults   0 0
#UUID=c2e43dd4-ca2a-4f75-a3a2-7eb54e5fb809   /mnt/pve/nextcloud   ext4   defaults   0 0

In the configuration above my system boots. But as soon as I uncomment one or both of the bottom two lines, it won't boot.
When I try to ssh into the system it says "connection refused". What is wrong here? If I edit the fstab file and systemctl daemon-reload
and use mount -a I don't get any errors. (Btw I also already tried using /dev/mapper/ instead of the UUID, same result).

Here is my drive setup (lsblk). What I absolutely don't understand: /mnt/pve/vmstorage is not mentioned in fstab but is always automounted... Is this because it is a full drive and not a volume?

Code:
NAME                  MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda                     8:0    0   9.1T  0 disk
├─sda1                  8:1    0   200M  0 part
├─sda2                  8:2    0   9.1T  0 part
└─sda3                  8:3    0   100M  0 part
sdb                     8:16   0  14.6T  0 disk
├─sdb1                  8:17   0   200M  0 part
└─sdb2                  8:18   0  14.6T  0 part
sdc                     8:32   0 931.5G  0 disk
├─sdc1                  8:33   0  1007K  0 part
├─sdc2                  8:34   0     1G  0 part
└─sdc3                  8:35   0 930.5G  0 part
  ├─pve-swap          252:0    0     8G  0 lvm  [SWAP]
  ├─pve-root          252:1    0    96G  0 lvm  /
  ├─pve-iso           252:2    0   200G  0 lvm 
  ├─pve-nextcloud     252:3    0   300G  0 lvm 
  └─pve-slowvmstorage 252:4    0 326.5G  0 lvm  /mnt/pve/slowvmstorage
sdd                     8:48   0   3.6T  0 disk
├─sdd1                  8:49   0   200M  0 part
└─sdd2                  8:50   0   3.6T  0 part
nvme0n1               259:0    0   1.8T  0 disk
└─nvme0n1p1           259:1    0   1.8T  0 part /mnt/pve/vmstorage
nvme1n1               259:2    0 953.9G  0 disk
├─nvme1n1p1           259:3    0   100M  0 part
├─nvme1n1p2           259:4    0    16M  0 part
├─nvme1n1p3           259:5    0   953G  0 part
└─nvme1n1p4           259:6    0   775M  0 part

Appreciate your help!
 
presumably, you are using your disks as directory storage?

In that case, most likely, you have a boot race. /mnt/pve is a special location maintained by proxmox. Perhaps your first mount makes it, but the rest get blocked or fail. Or may be uuid's are wrong, or target directory dont exist. Examining the log of a failed boot should provide the answer.

You should really not mount anything in /mnt/pve manually. Mount your disks elsewhere (/mnt/path), then add is_mountpoint attribute to your storage definition.

https://forum.proxmox.com/threads/how-to-mount-existing-disk-to-storage.66559/

PS after you adjust your fstab do mount -a before reboot to ensure you are not getting errors and disk get mounted.


Blockbridge: Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!