Auto mount external USB drive in Proxmox 6.2

Craig Tosi

Active Member
Aug 19, 2016
21
1
43
61
I recently did an inplace upgrade from PVE 5.4 to 6.2. Prior to the upgrade I had external USB drives auto-mounting via an entry in /etc/fstab along these lines:-

Code:
/dev/sdc1 /mnt/rdx auto defaults,noatime,auto,nofail 0 2

Since the upgrade the drives no longer auto-mount. In researching this I've come across a variety of methods to achieve the end goal but much of the information is some years old & not applicable to Proxmox VE 6/Debian 10. So my question is really about what is the most appropriate method to auto mount drives that will survive future updates & version upgrades etc?
 
try to mount the partition with uuid instead of /dev/sdxx

use blkid to view the uuid

Code:
blkid
/dev/sda1: UUID="5741fbc8-dccd-4aa3-88ce-f7b5717df02b" TYPE="ext4" PARTUUID="0da1f450-01"

and in fstab

Code:
UUID=5741fbc8-dccd-4aa3-88ce-f7b5717df02b /               ext4    errors=remount-ro 0       1
 
Thanks for the response. Just to clarify, when I say auto-mount I'm talking about automatically mounting on USB connection of the drive, not at boot time.

I can mount the drive using either it's UUID or /dev/sdxn designation, but neither of the below entries in /etc/fstab mounts the drive on USB connection:-

Code:
/dev/sdc1 /mnt/rdx auto defaults,noatime,auto,nofail 0 2

Code:
UUID=2992a6b2-d93c-4ffe-8c1f-f152df4c64c4 /mnt/rdx    ext4    defaults,noatime,auto,nofail 0 2
 

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!