rbd: failed to set udev buffer size: (1) Operation not permitted
rbd: sysfs write failed
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (13) Permission denied
Hi, this doesn’t seem to be a supported scenario today. See Storage drivers - LXD documentation 5.21.7 which has a x (not supported) in the Storage driver usable inside a container row.
However what I would propose is mapping the volume on the host and attach it to the container after a FS was put on top. Raw block vols (without a FS) cannot be attached to containers.
Is there a reason you cannot use a LXD storage pool using the ceph Ceph RBD driver?
My use case is the following. I need to mount all the volumes of a container (instance and device volumes, if any) in order to back them up or to restore them with the Proxmox Backup Client. I’m doing it in a script that works well on the host with ZFS pools. Now I need to extend it to Ceph pools.
For security and operations-related reasons I’m evaluating whether it is feasible to move the backup operation in a guest, let’s call it Control Node, being it a container or a virtual machine.
Raw block vols (without a FS) cannot be attached to containers.
I understand this is the key limitation of the container as Control Node for my purpose. At this point, even if a container would be better, it is fine for me to use a Virtual Machine.
The question is then different: is it possible to mount a ZFS dataset from a VM in the same host?
This is the command that I need to issue.
mount -t zfs <INSTANCE_POOL_NAME}>/containers/<INSTANCE_PROJECT>_<INSTANCE_NAME>@snapshot-BACKUP /tmp/<INSTANCE_PROJECT>_<INSTANCE_NAME>/container/backup/container
The question is then different: is it possible to mount a ZFS dataset from a VM in the same host?
I am not sure I am following you but if you want to attach e.g. the root vol of one instance to another instance you can do this with LXD the same way as you would do for custom volumes:
lxc storage volume attach <pool> (virtual-machine|container)/<instance name> <vm name to attach to>
Make sure the instance vol you want to attach has lxc storage volume set <pool> (virtual-machine|container)/<instance name> security.shared=true set.
This would allow you to run your backup jobs inside a VM with the vols of other instances attached to this VM, may it be from a ZFS or Ceph pool without manually running any mount command.
Sorry for the confusion, looks like this isn’t available for containers as of today. I wasn’t able to find the reasoning why containers are excluded, so feel free to open up a feature request on GitHub.