Hi All,
I'm currently doing my fuirst things with LXC containers and my idea was to have a COntainer with Redis in there and use a special Mount-Point for the "/var/lib/redis" directory inside the container to be able to update container independently from persisted data.
I use a glusterfs shared storage and because it is still not officially allowed to use it for container I did what was told in a thread and added a Directory storage with the glusterfs mount point as base to be able to store Container stuff on GlusterFS
So I added a container and ended up in having two "RAW image files" with the defined sizes ... basically works.
Now (also to be able to better backup the stuff on a file basis) I thought about changing the setup again and use a "directory" based rootfs and "data", but because it is not possible using GUI I struggle with the command line ... and it is very hard to find examples. Infos from Docs saying pass "size=0" ...
So I tried:
Result:
unable to create CT 301 - unable to parse directory volume name 'rootdir-301'
After that I check through the perl sources a bit and found a place where the volume ID is parsed and for root dir I found a regex (https://github.com/proxmox/pve-storage/blob/master/PVE/Storage/Plugin.pm#L382) ... that regex assumes that only one dir per VM-ID is possible (??), so I tried to adopt the volume name and removed the mp0 :-( But ok, next try:
Result:
unable to create CT 301 - volume 'glusterfs-container:rootdir/301' does not exist
Ok, so I went to the storage in private and created the directory 301 and executed the command again.
Result:
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1441.
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1463.
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1463.
Use of uninitialized value $format in concatenation (.) or string at /usr/share/perl5/PVE/LXC.pm line 1500.
mounting container failed
unable to create CT 301 - unsupported image format ''
So my question now ... how the command needs to be to get that working? Is it possible to have two "directories" for it to separate "system" and "data"?
Thank you for help on that.
For completenes: I use latest Proxmox 5.x version
I'm currently doing my fuirst things with LXC containers and my idea was to have a COntainer with Redis in there and use a special Mount-Point for the "/var/lib/redis" directory inside the container to be able to update container independently from persisted data.
I use a glusterfs shared storage and because it is still not officially allowed to use it for container I did what was told in a thread and added a Directory storage with the glusterfs mount point as base to be able to store Container stuff on GlusterFS
So I added a container and ended up in having two "RAW image files" with the defined sizes ... basically works.
Now (also to be able to better backup the stuff on a file basis) I thought about changing the setup again and use a "directory" based rootfs and "data", but because it is not possible using GUI I struggle with the command line ... and it is very hard to find examples. Infos from Docs saying pass "size=0" ...
So I tried:
Code:
root@pm7:~# pct create 301 apollonnas-nfs:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz --cores 2 --cpuunits 1024 --memory 1024 --swap 512 --hostname redis2 --net0 bridge=vmbr0,name=eth0,ip=dhcp,ip6=dhcp,firewall=1 --rootfs glusterfs-container:rootdir-301,size=0,replicate=0,shared=1 --mp0 glusterfs-container:libredis-301,size=0,mp=/var/lib/redis,replicate=0,shared=1 --onboot 1 --pool Test --unprivileged 1 --ssh-public-keys .ssh/nuc-ingof-rsa.pub
Result:
unable to create CT 301 - unable to parse directory volume name 'rootdir-301'
After that I check through the perl sources a bit and found a place where the volume ID is parsed and for root dir I found a regex (https://github.com/proxmox/pve-storage/blob/master/PVE/Storage/Plugin.pm#L382) ... that regex assumes that only one dir per VM-ID is possible (??), so I tried to adopt the volume name and removed the mp0 :-( But ok, next try:
Code:
root@pm7:~# pct create 301 apollonnas-nfs:vztmpl/ubuntu-18.04-standard_18.04.1-1_amd64.tar.gz --cores 2 --cpuunits 1024 --memory 1024 --swap 512 --hostname redis2 --net0 bridge=vmbr0,name=eth0,ip=dhcp,ip6=dhcp,firewall=1 --rootfs glusterfs-container:rootdir/301,size=0,replicate=0,shared=1 --onboot 1 --pool Test --unprivileged 1 --ssh-public-keys .ssh/nuc-ingof-rsa.pub
Result:
unable to create CT 301 - volume 'glusterfs-container:rootdir/301' does not exist
Ok, so I went to the storage in private and created the directory 301 and executed the command again.
Result:
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1441.
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1463.
Use of uninitialized value $format in string eq at /usr/share/perl5/PVE/LXC.pm line 1463.
Use of uninitialized value $format in concatenation (.) or string at /usr/share/perl5/PVE/LXC.pm line 1500.
mounting container failed
unable to create CT 301 - unsupported image format ''
So my question now ... how the command needs to be to get that working? Is it possible to have two "directories" for it to separate "system" and "data"?
Thank you for help on that.
For completenes: I use latest Proxmox 5.x version