wetopi / docker-volume-rbd

Docker Engine managed plugin to manage RBD volumes.
MIT License
72 stars 18 forks source link

mkfsOptions only support one option #10

Open sebt3 opened 5 years ago

sebt3 commented 5 years ago
docker volume create -d rbd -o size=10 -o fstype=ext4 -o mkfsOptions="-Eroot_owner=0:0 -Ommp" cephtest
Error response from daemon: create cephtest: VolumeDriver.Create: volume-rbd Name=cephtest Request=Create Message=unable to create ceph rbd image: exit status 1

while

docker volume create -d rbd -o size=10 -o fstype=ext4 -o mkfsOptions="-Eroot_owner=0:0" cephtest
cephtest
docker volume create -d rbd -o size=10 -o fstype=ext4 -o mkfsOptions="-Ommp" cephtest2
cephtest2

So using multiple create options is not supported

rezatorabi commented 4 years ago

Not very related to this issue but Is there any way to override the default mkfsOptions which enables mmp? I need to disable it so that I can mount a volume in multiple containers (Only one of them mounts the volume as rw and others mount as ro). But I can't pass an empty string as mkfsOptions (-o mkfsOptions="" causes an error).

cherbst commented 4 days ago

You're right, setting an empty string does not work. You could just disable mmp if that is what you want with: docker volume create -d rbd -o size=10 -o mkfsOptions="-O^mmp" cephtest