Ask Your Question
0

Use mount resource with ceph-fuse

asked 2016-11-17 09:15:45 -0500

Herr-Herner gravatar image

I am forced to use ceph-fuse because of some shortcomings of the kernel driver for mounting my CephFS. Is it possible to use Puppet's built-in mount resource for this use case. Unfortunaltey, I cannot find any example regarding Puppet and ceph-fuse, but I have found this: https://github.com/wikimedia/puppet-c...

It shows how to use the mount resource in combination with hdfs-fuse.

The Ceph command looks as follows: ceph-fuse -m os-storage01:6789 -r /volumes/_nogroup/28811c02-5c73-4101-a44f-6a34a96657c4 /tmp/test.

Must I implement a new Puppet defined type or can I use the mount resource in some way? Any ideas?

Regards, Jens

edit retag flag offensive close merge delete

Comments

Is there a helper program `/sbin/mount.ceph`? Then `mount(8)` automatically picks the helper specified by the filesystem type `mount -t ceph what where`. If you suffer from `systemd`isease, you could write a `systemd.unit(5)` instead. Just, do some trial 'n 'error finding your favorite solution.

Kai Burghardt gravatar imageKai Burghardt ( 2016-11-17 13:18:07 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2016-11-17 23:40:57 -0500

Herr-Herner gravatar image

updated 2016-11-17 23:50:54 -0500

Inspired by the Hadoop approach, I have found two ways of achieving a mount via Puppet's mount resource using ceph-fuse.

First solution:

mount { 'ceph::mount::/tmp/test':
  ensure   => 'mounted',
  device   => 'mount.fuse.ceph#conf=/etc/ceph/ceph.conf,id=admin,client_mountpoint=/volumes/_nogroup/54bed6e8-4b35-43cf-bc98-888b7106694d',
  name     => '/tmp/test'
  fstype   => 'fuse',
  options  => '_netdev,noatime,allow_other,rw'
  dump     => '0',
  pass     => '0',
  remounts => false,
}

Second solution:

mount { 'ceph::mount::/tmp/test':
  ensure   => 'mounted',
  device   => 'conf=/etc/ceph/ceph.conf,id=admin,client_mountpoint=/volumes/_nogroup/54bed6e8-4b35-43cf-bc98-888b7106694d',
  name     => '/tmp/test',
  fstype   => 'fuse.ceph',
  options  => '_netdev,noatime,allow_other,rw',
  dump     => '0',
  pass     => '0',
  remounts => false,
}

This example mounts the OpenStack Manila Ceph share /volumes/_nogroup/54bed6e8-4b35-43cf-bc98-888b7106694d into your system.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-11-17 09:15:45 -0500

Seen: 40 times

Last updated: Nov 17 '16