5

I have a test node running Ceph where about 10TB of data are stored in a CephFS filesystem. I want to make certain subpaths in the CephFS file available to a Docker container where it can be shared over NFS and SMB.

The osds, mons and mds' are running on the same node which inhibits mounting CephFS in fstab.

How else can I mount subpaths of the CephFS filesystem into the container(s)?

chaosaffe
  • 848
  • 9
  • 22
Jesper
  • 111
  • 2
  • 6
  • Out of curiosity — since the host runs the ceph stack already, why don't you want to mount the fs on the host, then bind it to the container as a Docker volume? – jpetazzo Mar 12 '14 at 19:11
  • I tried putting it in fstab. But then it would try to mount imediadly after mounting the xfs filesystems required for ceph osd's. I guess you could put the cephfs mount in init. But then the docker containers would have to be started manually too. – Jesper Mar 12 '14 at 19:26
  • Ohwait, I hadn't understood correctly. OK, hmm, have you tried to run the container with the `--privileged` flag, then just try to mount the thing? That should work... – jpetazzo Mar 13 '14 at 01:21
  • http://stackoverflow.com/questions/39922161/mounting-nfs-shares-inside-docker-container – jiamliang Dec 08 '16 at 06:16
  • Are you making this available to a Docker (OCI) container or an LXC container? They are _very_ different things... – chaosaffe Nov 18 '19 at 23:02

1 Answers1

0

I think using this docker volume plugin for cephfs would solve your problem: https://gitlab.com/n0r1sk/docker-volume-cephfs

Aníbal Rivero
  • 302
  • 2
  • 7