[SOLVED] Mount storage to lxc with lvm

petitminion

New Member
Sep 17, 2019
11
1
3
31
Hey !

I'm trying to do quite a simple thing. I want to add a storage to a lxc container. I want it to be a lvm-thin (so I can make snapshots, I don't need to share the storage). The storage I want to use is in a empty hard disk.

I encrypted the hard disk with luks. I manually created a lvm pv, and a lvm vg. After that I added the vg as new storage in the web gui. It appears in /etc/pve/storage.cfg.

So now i have something like this (give by lsblk) :

sdc 8:32 0 3.7T 0 disk
└─ddi2 253:4 0 3.7T 0 crypt
└─datalxc-lvol0 253:5 0 2G 0 lvm

datalxc is the volume group
I supposed lvol0 is the lv automatically created by PVE.

The problem is that I can't access the lv in my lxc container. In the options of the container, the mount point appears in red, and in the config I have :

[pve: pending] mp0: Datalxc:10,mp=/mnt/ddi


I'm stuck here. What I did wrong ? Thx :)
 
[pve:pending] is the pending changes section. you need to stop and start your container to have it mounted.
 
you're welcome. you can mark the thread as [SOLVED] so others know what to expect