root@9106b80bf5e9:~# rbd --pool test-pool ls -l2014-10-03 12:33:36.753167 7fa7ceb72700 0 -- :/1000172 >> 192.168.100.114:6789/0 pipe(0x7fa7d0d8f340 sd=3 :0 s=1 pgs=0 cs=0 l=1 c=0x7fa7d0d8f5b0).faultNAME SIZE PARENT FMT PROT LOCKtest-image 1024M 1z
But could not map it as "rbd: add failed: (30) Read-only file system"
root@9106b80bf5e9:~# rbd map test-image --pool test-pool
rbd: add failed: (30) Read-only file system--
You received this message because you are subscribed to the Google Groups "CoreOS User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coreos-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
core@core002 ~ $ docker run --privileged -v /etc/ceph:/etc/ceph -d -p 1022:22 -p 6789:6789 496d183593fb /usr/sbin/sshd -D792fa908455f514e4133b3c0e1fe5cb855ead033ed18a588977148563bbe9905core@core002 ~ $ docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES792fa908455f ossl/ubuntu1:0.1 "/usr/sbin/sshd -D" 4 seconds ago Up 1 seconds 0.0.0.0:1022->22/tcp, 0.0.0.0:6789->6789/tcp naughty_brown
core@core002 ~ $ docker inspect 792fa908455f[{ "Args": [ "-D" ], "Config": { "AttachStderr": false, "AttachStdin": false, "AttachStdout": false, "Cmd": [ "/usr/sbin/sshd", "-D" ], "CpuShares": 0, "Cpuset": "", "Domainname": "", "Entrypoint": null, "Env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" ], "ExposedPorts": { "22/tcp": {}, "6789/tcp": {} }, "Hostname": "792fa908455f", "Image": "496d183593fb", "Memory": 0, "MemorySwap": 0, "NetworkDisabled": false, "OnBuild": null, "OpenStdin": false, "PortSpecs": null, "StdinOnce": false, "Tty": false, "User": "", "Volumes": null, "WorkingDir": "" }, "Created": "2014-10-04T02:46:27.461827338Z", "Driver": "btrfs", "ExecDriver": "native-0.2", "HostConfig": { "Binds": [ "/etc/ceph:/etc/ceph" ], "CapAdd": null, "CapDrop": null, "ContainerIDFile": "", "Devices": [], "Dns": null, "DnsSearch": null, "Links": null, "LxcConf": [], "NetworkMode": "bridge", "PortBindings": { "22/tcp": [ { "HostIp": "", "HostPort": "1022" } ], "6789/tcp": [ { "HostIp": "", "HostPort": "6789" } ] }, "Privileged": true, "PublishAllPorts": false, "RestartPolicy": { "MaximumRetryCount": 0, "Name": "" }, "VolumesFrom": null }, "HostnamePath": "/var/lib/docker/containers/792fa908455f514e4133b3c0e1fe5cb855ead033ed18a588977148563bbe9905/hostname", "HostsPath": "/var/lib/docker/containers/792fa908455f514e4133b3c0e1fe5cb855ead033ed18a588977148563bbe9905/hosts", "Id": "792fa908455f514e4133b3c0e1fe5cb855ead033ed18a588977148563bbe9905", "Image": "496d183593fbbbce9ba3b49b6beab39dc2ef6e43efbccaa71287822888ef329a", "MountLabel": "", "Name": "/naughty_brown", "NetworkSettings": { "Bridge": "docker0", "Gateway": "172.17.42.1", "IPAddress": "172.17.0.26", "IPPrefixLen": 16, "PortMapping": null, "Ports": { "22/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "1022" } ], "6789/tcp": [ { "HostIp": "0.0.0.0", "HostPort": "6789" } ] } }, "Path": "/usr/sbin/sshd", "ProcessLabel": "", "ResolvConfPath": "/var/lib/docker/containers/792fa908455f514e4133b3c0e1fe5cb855ead033ed18a588977148563bbe9905/resolv.conf", "State": { "ExitCode": 0, "FinishedAt": "0001-01-01T00:00:00Z", "Paused": false, "Pid": 12835, "Restarting": false, "Running": true, "StartedAt": "2014-10-04T02:46:29.488055642Z" }, "Volumes": { "/etc/ceph": "/etc/ceph" }, "VolumesRW": { "/etc/ceph": true }}root@792fa908455f:~# rbd --pool test-pool ls -lNAME SIZE PARENT FMT PROT LOCKtest-image 1024M 1root@792fa908455f:~# rbd map --image test-image --pool test-poolrbd: add failed: (22) Invalid argumentroot@792fa908455f:~# modprobe rbdmodprobe: ERROR: ../libkmod/libkmod.c:556 kmod_search_moddep() could not open moddep file '/lib/modules/3.16.2+/modules.dep.bin'
root@792fa908455f:~# ls /lib/modules/*/modules.dep.binls: cannot access /lib/modules/*/modules.dep.bin: No such file or directory
root@792fa908455f:~# uname -aLinux 792fa908455f 3.16.2+ #2 SMP Wed Oct 1 23:00:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linuxroot@792fa908455f:~# cat /etc/lsb-releaseDISTRIB_ID=UbuntuDISTRIB_RELEASE=14.04DISTRIB_CODENAME=trustyDISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"Chris Armstrong
Head of Services
OpDemand / Deis.io
GitHub: https://github.com/deis/deis -- Docs: http://docs.deis.io/
--
Chris Armstrong
Head of Services
OpDemand / Deis.io
GitHub: https://github.com/deis/deis -- Docs: http://docs.deis.io/
root@974c0461a790:~# rbd showmappedid pool image snap device0 test-pool test-image - /dev/rbd0
root@974c0461a790:~# ls -l /mnt/cephtotal 4-rw-r--r-- 1 root root 12 Oct 7 10:34 test.txtcore@core002 ~ $ sudo modprobe rbdcore@core002 ~ $ sudo echo "192.168.100.112 name=admin test-pool test-image" | sudo tee /sys/bus/rbd/add
core@core002 ~ $ sudo mkdir /mnt/ceph
core@core002 ~ $ sudo mount /dev/rbd0 /mnt/ceph
Chris Armstrong
Head of Services
OpDemand / Deis.io
GitHub: https://github.com/deis/deis -- Docs: http://docs.deis.io/
Notice: This email is confidential and may contain copyright material of members of the Ocado Group. Opinions and views expressed in this message may not necessarily reflect the opinions and views of the members of the Ocado Group.
If you are not the intended recipient, please notify us immediately and delete all copies of this message. Please note that it is your responsibility to scan this message for viruses.
References to the “Ocado Group” are to Ocado Group plc (registered in England and Wales with number 7098618) and its subsidiary undertakings (as that expression is defined in the Companies Act 2006) from time to time. The registered office of Ocado Group plc is Titan Court, 3 Bishops Square, Hatfield Business Park, Hatfield, Herts. AL10 9NE.
core@core004 ~ $ sudo modprobe rbdcore@core004 ~ $ sudo echo "192.168.100.112 name=admin test-pool test-image"|sudo tee /sys/bus/rbd/add192.168.100.112 name=admin test-pool test-imagetee: /sys/bus/rbd/add: Invalid argumentdocker run -i -v /sys:/sys --net host 172.21.12.100:5000/deis/store-base:git-3d4ca8f /bin/bash
Note that we also had to bind-mount /sys so that it's not read-only within the container. And I can confirm that it works!
Chris Armstrong
Head of Services
OpDemand / Deis.io
GitHub: https://github.com/deis/deis -- Docs: http://docs.deis.io/
With the networking mode set to host a container will share the host's network stack and all interfaces from the host will be available to the container. The container's hostname will match the hostname on the host system. Publishing ports and linking to other containers will not work when sharing the host's network stack."