Get the real device name to match wtih lsblk

This commit is contained in:
Nico Schottelius 2018-02-18 21:06:28 +01:00
parent c8425833af
commit 7829f82fb3

View file

@ -86,7 +86,8 @@ chown -R ceph:ceph "$mountpath"
if [ $# -eq 1 ]; then
WEIGHT=$1; shift
else
nodev=$(echo $dev_block | sed 's,/dev/,,')
devname=$(readlink -f $dev_block)
nodev=$(echo $devname | sed 's,/dev/,,')
WEIGHT=$(lsblk -l -b | awk "/^$nodev/ { print \$4/(1024^4) }")
fi