/usr/bin/ceph-rbdnamer is in librbd1 0.80.7-2+deb8u2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 | #!/bin/sh
DEV=$1
NUM=`echo $DEV | sed 's#p.*##g' | tr -d 'a-z'`
POOL=`cat /sys/devices/rbd/$NUM/pool`
IMAGE=`cat /sys/devices/rbd/$NUM/name`
SNAP=`cat /sys/devices/rbd/$NUM/current_snap`
if [ "$SNAP" = "-" ]; then
echo -n "$POOL $IMAGE"
else
echo -n "$POOL $IMAGE@$SNAP"
fi
|