%{_bindir}/ceph-fuse
%{_mandir}/man8/ceph-fuse.8*
%{_sbindir}/mount.fuse.ceph
+%{_unitdir}/ceph-fuse@.service
+%{_unitdir}/ceph-fuse.target
%files -n rbd-fuse
%defattr(-,root,root,-)
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mds/lib/systemd/system/ceph-mds@.service
install -m0644 systemd/ceph-mds.target debian/ceph-mds/lib/systemd/system
+ install -d -m0755 debian/ceph-fuse/lib/systemd/system
+ install -m0644 systemd/ceph-fuse@.service debian/ceph-fuse/lib/systemd/system
+ sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-fuse/lib/systemd/system/ceph-fuse@.service
+ install -m0644 systemd/ceph-fuse.target debian/ceph-fuse/lib/systemd/system
+
install -d -m0755 debian/ceph-mgr/lib/systemd/system
install -m0644 systemd/ceph-mgr@.service debian/ceph-mgr/lib/systemd/system
sed -i s./etc/sysconfig/./etc/default/.g debian/ceph-mgr/lib/systemd/system/ceph-mgr@.service
override_dh_strip:
dh_strip -pceph-mds --dbg-package=ceph-mds-dbg
+ dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg
dh_strip -pceph-mgr --dbg-package=ceph-mgr-dbg
dh_strip -pceph-mon --dbg-package=ceph-mon-dbg
dh_strip -pceph-osd --dbg-package=ceph-osd-dbg
See `ceph-fuse`_ for additional details.
+To automate mounting ceph-fuse, you may add an entry to the system fstab_.
+Additionally, ``ceph-fuse@.service`` and ``ceph-fuse.target`` systemd units are
+available. As usual, these unit files declare the default dependencies and
+recommended execution context for ``ceph-fuse``. An example ceph-fuse mount on
+``/mnt`` would be::
+
+ sudo systemctl start ceph-fuse@/mnt.service
+
+A persistent mount point can be setup via::
+
+ sudo systemctl enable ceph-fuse@/mnt.service
+
.. _ceph-fuse: ../../man/8/ceph-fuse/
-.. _CEPHX Config Reference: ../../rados/configuration/auth-config-ref
\ No newline at end of file
+.. _fstab: ./fstab
+.. _CEPHX Config Reference: ../../rados/configuration/auth-config-ref
install(FILES
ceph.target
+ ceph-fuse.target
ceph-osd.target
ceph-mgr.target
ceph-mon.target
ceph-mds.target
ceph-radosgw.target
ceph-rbd-mirror.target
+ ceph-fuse@.service
ceph-mds@.service
ceph-mgr@.service
ceph-mon@.service
--- /dev/null
+[Unit]
+Description=ceph target allowing to start/stop all ceph-fuse@.service instances at once
+PartOf=ceph.target
+[Install]
+WantedBy=remote-fs.target ceph.target
--- /dev/null
+[Unit]
+Description=Ceph FUSE client
+After=network-online.target local-fs.target time-sync.target
+Wants=network-online.target local-fs.target time-sync.target
+Conflicts=umount.target
+PartOf=ceph-fuse.target
+
+[Service]
+EnvironmentFile=-/etc/sysconfig/ceph
+Environment=CLUSTER=ceph
+ExecStart=/usr/bin/ceph-fuse -f --cluster ${CLUSTER} %I
+TasksMax=infinity
+Restart=on-failure
+StartLimitInterval=30min
+StartLimitBurst=3
+
+[Install]
+WantedBy=ceph-fuse.target