[SOLVED] Reinstall Proxmox and remount Storage

mle

Member
Aug 5, 2021
78
16
13
31
Austria
I have a quick question I would like to reinstall Proxmox.

I have backed up all VMs and LXC on a HW-HDD-RAID-10 which is formatted EXT4.
I formatted and mounted the HW-HDD-RAID-10 via the Proxmox GUI.

Proxmox itself is on an SSD-RAID-10 which I want to format and reinstall.

But before I do that, I would like to know how to mount the HW-HDD-RAID-10 (EXT4) in Proxmox again after the installation without formatting it.

I have already searched the forum and asked google but only find solutions to mount it via the fstab, but that's not it either, so I ask again how to do it correctly.

The only thing I've found that looks like it's going in the right direction:
https://blog.netnerds.net/2022/03/add-existing-storage-proxmox-without-wiping-it-first/

I have now tested this with a different EXT4 formatted memory but can't really get there.

Thanks for your help

MFG. mle
 
I have already searched the forum and asked google but only find solutions to mount it via the fstab, but that's not it either, so I ask again how to do it correctly.
Yes, you have to manually mount it for example via fstab or systemd service. And then add a new directory storage at "Datacenter -> Storage -> Add" pointing to the mountpoint of your mounted ext4 partition. And don't forget to set the "is_mountpoint" option for that storage via pvesm command.
 
Last edited:
Got the solution:

Proxmox uses systemd for mounting:

First we find out the correct name for the systemd file:

1x systemd-escape -p --suffix=mount "/mnt/pve/test-hdd"
mnt-pve-test\x2dhdd.mount

Then find out the UUID:

2x lsblk -fs
xxxxxxxx-xxxx-xxxx-xxxxxx-xxxxxxxxxxxxxxxx

Now create the systemd file: (Important 2x \\ in the file name if a - is used)

3x nano /etc/systemd/system/mnt-pve-test\\x2dhdd.mount

Code:
[Install]
WantedBy=multi-user.target

[Mount]
Options=defaults
Type=ext4
What=/dev/disk/by-uuid/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Where=/mnt/pve/test-hdd

[Unit]
Description=Mount storage 'test-hdd' under /mnt/pve

Now start the systemd service:

4x systemctl enable mnt-pve-test\\x2dhdd.mount

If everything went well, we can check it with the following command:

5x systemctl list-unit-files -t mount

mnt-pve-test\x2dhdd.mount enabled enabled

I then like to perform a reboot and check it again ;-)

Now you should be able to add the directory in the Proxmox GUI as usual.

I hope I can help others with this or a similar problem ;-)

MFG. mle
 
Yes, you have to manually mount it for example via fstab or systemd service. And then add a new directory storage at "Datacenter -> Storage -> Add" pointing to the mountpoint of your mounted ext4 partition. And don't forget to set the "is_mountpoint" option for that storage via pvesm command.

Short question about the "is_mountpoint" by default this is not set in the /etc/pve/storage.cfg should you always add it with is_mountpoint yes?
 
If you don't do it and mounting your ext4 fails, then the directory storage won't fail and everything that should be written to your ext4 partition will end up on the root filesystem until your server crashes once the root filesystem gets filled completely. So yes, you usually want that: pvesm set YourStorageID --is_mountpoint /path/to/your/mountpoint
 
  • Like
Reactions: mle

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!