How to add physical HDD to container (not as .raw disk)

Laggger164

Member
Oct 28, 2018
6
0
6
25
I have big harddrives with lots of data inside that I want to keep and use.

The filesystem on the drives is xfs on a single partition.

I have mounted HDDs before, I used something like this: https://manjaro.site/how-to-add-extra-hard-drives-to-proxmox-6-2-ve/

However that creates a .raw drive file to be accessed by the container. Instead I want to access the data already on the drive, like a passthrough.
I also found this post, but wasn't sure if it is valid for what I wanted: https://forum.proxmox.com/threads/container-with-physical-disk.42280/#post-203292

Thank you for any and all help!
 
u have to decide if u want a bind mount with some drawbacks or direct access of the drive

this post show the direct access
So I can just slap /dev/sdb1,mp=/mnt/esdb,backup=0 in the configuration file, no vm-101/100.raw or whatever and it should work?
 
no, u can only pci devices bind to vm - so u would need a unused sata-controller and connect the hdd there
correction: in the proxmox gui

via config-file see: https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)
Right, I don't think that is viable.

Still, is there a better guide on how to do this just so I don't screw anything up?

I believe in that post he mentions things that did NOT work, and I have trouble discerning which parts work and which don't.
 
I just slapped /dev/sdb1,mp=/mnt/esdb,backup=0 in there and it worked, although all files and folders as seen from the container are owned by "nobody" which could bring some permission problems, we'll see.

Anyways, thanks for the suggestions!
The issue is resolved.
 

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!