Get the real device name to match wtih lsblk
This commit is contained in:
parent
c8425833af
commit
7829f82fb3
1 changed files with 2 additions and 1 deletions
|
@ -86,7 +86,8 @@ chown -R ceph:ceph "$mountpath"
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
WEIGHT=$1; shift
|
WEIGHT=$1; shift
|
||||||
else
|
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) }")
|
WEIGHT=$(lsblk -l -b | awk "/^$nodev/ { print \$4/(1024^4) }")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue