M
M
Michael2020-11-29 15:47:49
System administration
Michael, 2020-11-29 15:47:49

How to mount a disk from a proxmox host machine into a container?

I want to make such a feint with my ears :)
1. A Yandex disk is installed on the container, backups of the database of all sites are made every night (Maria db) and all this stuff also flies safely to the poison and then to my laptop. Thus, data valuable to me is stored in three places - the POISON, in the Yandex.disk directory in the container and on my laptop. It suits me just fine.
2. On the host machine, I set up a backup of one of the containers that is important for me - every other day at 4 am it makes a backup of the virtual machine on a mounted USB flash drive. I understand that this collective farm will make someone smile - but for now it suits me :) because I haven’t saved up money for the third hard drive yet in the server
3. While stupidly in manual mode using scp -r [email protected]:/mnt/usb_storage/* /root/Yandex.Disk/backup/ I upload the backup of the container from the host to the container in the POISON folder, first of all, it’s gimmicky, not automated, thirdly, it takes up space in the container itself.

What I want (how to do it right):
1. Permanently mount a usb flash drive into the container (but I can’t because it’s not privileged) and doesn’t see this disk (probably it’s right)
2. Transfer virtual machine backup bypassing its physical storage inside the container (and so there is still little space and backups can be dragged into it)
3. Maybe there is some correct way to mount the disk from the host to the container and make a symlink of the contents to the disk's POI folder - so that the POI thinks that the data is in its directory and let them immediately be thrown into the POISON cloud, bypassing the virtual machine?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2020-11-29
@ky0

Maybe there is some correct way to mount a disk from a host to a container

Sections are mounted inside containers directly from the webmord or by the corresponding directive in the config:
mp0: /path/on/host,mp=/lxc/mount/point

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question