support zvol devices (#2678)

their partitions are exposed as "/dev/zdXXpY", handle accordingly.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian-Gruenbichler 2024-05-19 10:39:34 +02:00 committed by GitHub
parent b8838b305d
commit 3f6ddb6fb6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,8 @@ get_disk_part_name() {
echo ${DISK}p${2}
elif echo $DISK | grep -q "/dev/nbd[0-9]"; then
echo ${DISK}p${2}
elif echo $DISK | grep -q "/dev/zd[0-9]"; then
echo ${DISK}p${2}
else
echo ${DISK}${2}
fi