⚠️ Novidade no blog! ⚠️

O conteúdo dos Cursos, Trilhas e Livros Resolvidos está sendo movido para kdosh.net/edu. Acesse e divulgue!


The first thing you want to do is create a mount point for your drive using the drives UUID. Open up the shell on Proxmox (PM) host and grab the UUID of the disk you want to mount.

You will want to grab the UUID which looks something like this:

Make sure to identify the correct drive when grabbing the UUID. Next, we need to create the mountpoint for the drive on your PM host. I always mount my drives under the “/media” directory.

With the mount point created, next we will create an entry in the FSTAB for the drive on the PM host. Open up FSTAB with nano

Now add your drive, replacing the <UUID> and <Mount Point> with your own.

To mount the drive using the entry we just created, run mount

Now start the container and create a mount point inside the container where we can pass the drive to. Again, I will use the ‘/media’ directory and create a folder called ‘postdata’. You can name your folder whatever you want.

Now instead of modifying the container’s FSTAB, we will instead modify the config for the VM. Stop the container and open the PM host shell again. Open the config up with nano, taking note of the Container ID you want to mount the drive to.

Then at the bottom add an entry for mount point 0 (mp0). Take note of where the container mount point is and the PM host mount point, and ensure they reflect your settings.

That’s it. Start your container and check to ensure the drive is mounted.

You should now see the drive mounted to the mount point you created in the container earlier. Note that you can still mount drives using the container’s FSTAB, for instance I have a samba drive which I want the container to mount automatically when it’s started. The FSTAB file will be empty by default but you can add new entries there.


👉 https://hakedev.substack.com/p/proxmox-pass-hdd-to-container

*Atualizado em 18 de maio de 2024

Estude a Bíblia!
Subscribe
Notify of
guest
0 Comentários
Inline Feedbacks
View all comments