how to restore proxmox mounts after a system reinstallation

Saif_ali

New Member
Apr 18, 2020
5
0
1
44
hi, I had to reinstall proxmox on a failed node. I have used the below commands to re-join the cluster (same hostname and ip)

ssh-keygen -t rsa
pvecm add 10.5.50.192 --force


everything looks OK but the local mounts created previously by proxmox GUI are not working. they appear in the GUI (cluster level only ) but they are not actually mounted on the node. I can't find the related .mount files.
is this normal?
should I backup these files using an external tool in the future?
is there a way to force proxmox to recreate them?
 
Hi,

All data on the Installation disk are overwritten.
So If you mean the "local-lvm" and "local" data are missing?
If yes the data are gone on these storages on the local new installed node.

should I backup these files using an external tool in the future?
You should have always an offside copy(backup) of important data.
is there a way to force proxmox to recreate them?
You have to give a bit more information. Recreate what type of storage?
 
You have to give a bit more information. Recreate what type of storage?
I just want to automatically re-create the systemd mounts created while adding directory storage after reinstalling proxmox. For example,
while creating a directory mount for /dev/sdb (adding a directory storage in the node level), the below files will be created
/etc/systemd/system/mnt-pve-vpnode_sdb.mount --> (the actual systemd mount unit)
/etc/systemd/system/multi-user.target.wants/mnt-pve-vpnode_sdb.mount --->(a link to /etc/systemd/system/mnt-pve-vpnode_sdb.mount)

after reinstalling proxmox, these files will be missing. is there anyway around manual backup/restore?
 
There is no tool to regenerate this systemd mount files.
But here is a systemd.mount file that you can use to restore your mounts.

Code:
# /etc/systemd/system/mnt-pve-test.mount
[Install]
WantedBy=multi-user.target

[Mount]
Options=defaults
Type=ext4
What=/dev/disk/by-uuid/1e144825-59d9-41a5-81ce-a062b8469cdd
Where=/mnt/pve/test

[Unit]
Description=Mount storage 'test' under /mnt/pve
 
There is no tool to regenerate this systemd mount files.
But here is a systemd.mount file that you can use to restore your mounts.

thanks, I am thinking of write a script to copy them to /etc/pve/nodes , theoretically, I will have them ready after the reinstallation
 
Be careful with such things because of the limitation of the pmxcfs.
The pmxcfs(Proxmox Cluster Filesystem) is only capable of saving 32 MB of data
and a file is not allowed to be bigger than 512KB.
 

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!