My LXC containers in Proxmox 4 have a root filesystem stored on the host as a RAW disk image stored in :


This folder on the host computer is from an ext4 partition :

/dev/mapper/pve-data on /var/lib/vz type ext4 (rw,relatime,data=ordered)

I would like to attach a second disk image to a LXC container, but I can't find any way of achieving that. All I've managed to do was to bind-mount a folder from my host system to the container, but that's not an option for what I want to do : add a storage volume to my OpenMediaVault container.

Do you know any way (using Proxmox UI or/and CLI) of attaching a second disk image to a LXC container ?



See in below example how I mount an LVM partition from the host inside the guest machine:

execute these steps on the host machine. The number 100 is the id of the guest machine:

vi /var/lib/lxc/100/fstab
/dev/vg0/vm-100-disk-2 var/lib/mysql ext4 noatime 0 0

enable guest based fstab entry:

vi /var/lib/lxc/100/config
lxc.mount = /var/lib/lxc/100/fstab
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.