]> git.proxmox.com Git - ceph.git/blame - ceph/src/ceph-rbdnamer
update sources to v12.2.5
[ceph.git] / ceph / src / ceph-rbdnamer
CommitLineData
7c673cae
FG
1#!/bin/sh
2
3DEV=$1
4NUM=`echo $DEV | sed 's#p.*##g; s#[a-z]##g'`
5POOL=`cat /sys/devices/rbd/$NUM/pool`
6IMAGE=`cat /sys/devices/rbd/$NUM/name`
7SNAP=`cat /sys/devices/rbd/$NUM/current_snap`
8if [ "$SNAP" = "-" ]; then
9 echo -n "$POOL $IMAGE"
10else
11 echo -n "$POOL $IMAGE@$SNAP"
12fi