就是这个 datastore 里面有哪些硬盘存储,以及 mount 的位置是在哪里确定的。

basic-ui

cat /etc/proxmox-backup/datastore.cfg

# Output:
datastore: hdd-WD-4T-Red
        gc-schedule sat *-1..7 14:00
        path /mnt/datastore/hdd-WD-4T-Red
        verify-new true

这里可以看到 path 指定了这个 datastore的位置。

这个 datastore: 后面的,会在UI上面会被列在 Datastore 里面。

然后这个mount跟 proxmox 一样是通过 systemd 自动 mount 的。可以参见 proxmox-storage-mount-config

# Storage name: hdd-WD-4T-Red
cat /etc/systemd/system/mnt-datastore-hdd\\x\2dWD\\x2d4T\\x2dRed.mount
 
# Output
[Mount]
Options=defaults
Type=ext4
What=/dev/disk/by-uuid/03d6fda1-a60f-409e-a19f-2cc19191ac63
Where=/mnt/datastore/hdd-WD-4T-Red
 
[Install]
WantedBy=multi-user.target
 
[Unit]
Description=Mount datatstore 'hdd-WD-4T-Red' under '/mnt/datastore/hdd-WD-4T-Red'

然后这个 .mount 文件,通过 symbolic link的方式在 /etc/systemd/system/multi-user.target.wants/ 里面被引用。

ls -l /etc/systemd/system/multi-user.target.wants/mnt-datastore-hdd\\x2dWD\\x2d4T\\x2dRed.mount
 
# Output 
lrwxrwxrwx 1 root root 62 Jan  5 22:56 '/etc/systemd/system/multi-user.target.wants/mnt-datastore-hdd\x2dWD\x2d4T\x2dRed.mount' -> '/etc/systemd/system/mnt-datastore-hdd\x2dWD\x2d4T\x2dRed.mount'