Problem Statement

In Proxmox Backup Server, adding a new storage location is typically done through the WebUI. However, the WebUI does not allow you to add an existing filesystem or a pre-mounted directory as a datastore. This limitation can be inconvenient, especially when you already have a filesystem set up and want to use it directly, without reformatting or remounting it through the interface. To overcome this, it’s necessary to configure the storage manually via the command line.

Requirements

  • fs already mounted ( in this example it’s /storage/mounted )
vde          253:16   0    15T  0 disk /storage/backup

I think it’s easy, no need to cover it

Implementation

proxmox-backup-manager datastore create storage_name /storage/mounted
TASK ERROR: datastore path is not empty
Error: task failed (status datastore path is not empty)

the issue could be in lost+found

ls -lha /storage/mounted
total 16
drwx------ 2 root root 16384 Nov 22 15:29 lost+found

simple wayout to create empty dir and then create storage:

mkdir /storage/mounted/pbs

then repeat

proxmox-backup-manager datastore create storage_name /storage/mounted
Chunkstore create: 1%
blah-blah-blah
Chunkstore create: 99%
TASK OK

Check storage

proxmox-backup-manager datastore list
┌──────────────────┬───────────────────────────────┬─────────┐
│ name             │ path                          │ comment │
╞══════════════════╪═══════════════════════════════╪═════════╡
│ storage_name     │ /storage/mounted              │         │
└──────────────────┴───────────────────────────────┴─────────┘

fixed.