RBD with custom object size

May 27, 2021
27
1
8
46
Hello,

I need to use RBDs with custom object size different from the default 25 (4MB).
While it is possible to create it via command prompt:
Bash:
rbd -p poolName create vm-297-disk-1 --size 16G --object-size 16K

i don't know how to import it to make it available in LXC in some mount point?
 
You can mount a custom RBD by adding a mount point through the Proxmox Container Toolkit CLI:

Bash:
pct set 297 --mp0 <pool-name>:vm-297-disk-1,mp=<mount-point>,size=16G

Note that you might need to map it to a block device first and create a filesystem on it, see here.
 
Note that you might need to map it to a block device first and create a filesystem on it, see here.
What happens when I reboot the node or migrate the container to another host? Isn't there a way to import manually created vm-XXX-disk-N as if they were created through the GUI?