# rbdmap - Ceph RBD Mapping # # This script does not manage mount and unmount fs which depends on rbd device. # You should use _netdev option in fstab to mount and umount in the correct order. description "ceph rbd mounting" start on started rbdmap stop on unmounted-remote-filesystems pre-start script sed -e 's/#.*$//' -e 's/[ \t].*$//' \ -e '/^[ \t]*$/ d' /etc/ceph/rbdmap \ | while read dev; do if grep -qR "^/dev/rbd/${dev}" /etc/fstab /etc/fstab.d ; then mount "/dev/rbd/${dev}" fi done end script post-stop script sed -e 's/#.*$//' -e 's/[ \t].*$//' \ -e '/^[ \t]*$/ d' /etc/ceph/rbdmap \ | while read dev; do umount "/dev/rbd/${dev}" done end script