installer: detect xen native domU disks (xvd devices).

This commit is contained in:
Juan RP 2013-08-10 09:55:39 +02:00
parent 43a3b4085b
commit 7c42cf3fe8

View File

@ -128,14 +128,12 @@ show_disks() {
fi fi
done done
# SATA/SCSI and Virtual disks (virtio) # SATA/SCSI and Virtual disks (virtio)
for dev in $(ls /sys/block|grep -E '^[sv]d'); do for dev in $(ls /sys/block|grep -E '^([sv]|xv)d'); do
if [ "$(cat /sys/block/$dev/device/type)" != "5" ]; then echo "/dev/$dev"
echo "/dev/$dev" size=$(cat /sys/block/$dev/size)
size=$(cat /sys/block/$dev/size) sectorsize=$(cat /sys/block/$dev/queue/hw_sector_size)
sectorsize=$(cat /sys/block/$dev/queue/hw_sector_size) gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"
gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" echo "size:${gbytes}GB;sector_size:$sectorsize"
echo "size:${gbytes}GB;sector_size:$sectorsize"
fi
done done
} }