We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a87c5c2 commit f62b85dCopy full SHA for f62b85d
plugins/storage/sharedfs/storagevm/src/main/resources/conf/fsvm-init.yml
@@ -30,14 +30,9 @@ write_files:
30
}
31
32
get_block_device() {
33
- if [ "$HYPERVISOR" == "kvm" ]; then
34
- BLOCK_DEVICE="vdb"
35
- elif [ "$HYPERVISOR" == "xenserver" ]; then
36
- BLOCK_DEVICE="xvdb"
37
- elif [ "$HYPERVISOR" == "vmware" ]; then
38
- BLOCK_DEVICE="sdb"
39
- else
40
- log "Unknown hypervisor"
+ BLOCK_DEVICE=$(lsblk -dn -o NAME,TYPE | awk '$2=="disk"{print $1}' | tail -n 1)
+ if [ -z "$BLOCK_DEVICE" ]; then
+ log "Unknown data disk"
41
exit 1
42
fi
43
echo "$BLOCK_DEVICE"
0 commit comments