HDD with two partitions, one for a VM and one for a CT

eroit

New Member
May 22, 2023
6
0
1
Hi everyone.

I've just recently started using proxmox, and I use it to run Home Assistant on a VM and Frigate (in portainer) on a CT.
I've added an additional 2TB HDD to the machine and split it into two partitions, one I plan on using for backups of the VM and CT (120G), and one for storage for Frigate clips (1.7T).

1684774013245.png

I can see the HDD and the partitions in lsblk:

1684774075973.png

But I cant find them and add them to the VM or CT:

1684774150749.png

1684774208555.png

Could someone please point me in the right direction?
 
Hi,
this is not the best/recommended way to manage the storage in PVE. If you still can, wipe the disk and create a LVM on it. On that LVM you can then create logical volumes to attach to the VM and a logical volume to be mounted on the host, which then can be exposed as bind mount to the LXC. See the docs for details
https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_storage
 
  • Like
Reactions: eroit
Hi Chris, thanks a lot for the fast response.

I think I broke something. I did the following:

Wiped the disk
pvcreate /dev/sda
vgcreate vg_main /dev/sda
lvcreate -n Backup -L 120G vg_main
lvcreate -n Frigate -l 100%FREE vg_main

Then I tried rebooting proxmox to see if the disk/ volumes would show up, but it does not come back up. Tried to physically restart the computer as well, but still I can't log on from the browser. The machine shows up on my router as a client, so there is some activity.

Is this fixable or do I need to start from scratch?
I spent 3 days getting frigate to work, so a complete do-over now would maybe make me cry a little :)

Edit: Tried disconnecting the HDD, but still nothing.
Edit again: Tried connecting a monitor to the computer. The monitor picks up that the HMDI is connected, but there is never any picture (with or without HDD connected).
 
Last edited:
Hi Chris, thanks a lot for the fast response.

I think I broke something. I did the following:

Wiped the disk
pvcreate /dev/sda
vgcreate vg_main /dev/sda
lvcreate -n Backup -L 120G vg_main
lvcreate -n Frigate -l 100%FREE vg_main

Then I tried rebooting proxmox to see if the disk/ volumes would show up, but it does not come back up. Tried to physically restart the computer as well, but still I can't log on from the browser. The machine shows up on my router as a client, so there is some activity.

Is this fixable or do I need to start from scratch?
I spent 3 days getting frigate to work, so a complete do-over now would maybe make me cry a little :)

Edit: Tried disconnecting the HDD, but still nothing.
Edit again: Tried connecting a monitor to the computer. The monitor picks up that the HMDI is connected, but there is never any picture (with or without HDD connected).
That is odd, unless you performed some other actions this should not be related to the changes on the disk. Can you ping the machine? Can you ssh into the machine?
 
Could it be because I did not remove the entries for sda1 and sda2 in fstab?
Will try your suggestions later today.
Thanks for helping.
 
Update: I got a monitor working after inserting a GPU in the machine. This could be because the motherboard monitor connections are disabled. Here is what I got:
1684836905252.png

Any pointers for correcting this would be very much appriciated.
 
Update: I got a monitor working after inserting a GPU in the machine. This could be because the motherboard monitor connections are disabled. Here is what I got:
View attachment 50712

Any pointers for correcting this would be very much appriciated.
Yes, seems like the system tries to mount the old disk partitions. Try removing the entries from your fstab.
 
  • Like
Reactions: eroit
Thanks a lot Chris, back to normal now.

I have the two logical volumes in lvdisplay:

1684857005012.png

I'm not quite sure how to proceed from here. Would the next step be to mount them as follows?
mount /dev/vg_main/Backup /mnt/backup
mount /dev/vg_main/Frigate /mnt/frigate

Then add them is fstab as follows?
/dev/vg_main/Backup /mnt/backup ext4 defaults 0 0
/dev/vg_main/Frigate /mnt/frigate ext4 defaults 0 0
 
If you plan to purely use directory based storage (as I overlooked in your first post) you can also setup a directory based storage backend directly on the disk. You can do that also via the WebUI under Node > Disks > Directory. In that case there is no need for the LVM and you can configure the storage so to place your backups there and use the bind mount for the LXC.

The alternative, given the current setup on the logical volume group, you can create a file system on each of the logical volumes and mount them on boot. Then you can configure the directory based storage for PVE to place your backups and use a bind mount to add the other one to your container, as described in the bind mount section of the docs https://pve.proxmox.com/pve-docs/pve-admin-guide.html#pct_mount_points

For the difference in storage backends and their features, please see the corresponding section in the docs https://pve.proxmox.com/pve-docs/chapter-pvesm.html#_storage_configuration
 
Thanks Chris, this route seems more straight-forward.

However, as I go to wipe the disk I now get this error:
1684951361771.png

As far as I can see, there are no holders?
1684951415432.png

This thread turned out to be much more noise for you than I intended, sorry about that.
 
Thanks Chris, this route seems more straight-forward.

However, as I go to wipe the disk I now get this error:
View attachment 50767

As far as I can see, there are no holders?
View attachment 50768

This thread turned out to be much more noise for you than I intended, sorry about that.
No worries, you will have to remove the existing logical volume group via vgremove first, so it is not in use anymore.
 
  • Like
Reactions: eroit

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!