From 8261f90a2aaee2d16d0d719d8656a82e7239beb0 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Sat, 10 Oct 2015 10:19:43 +0200 Subject: installer: detect ciss(4) devices/partitions correctly (#44). --- installer.sh.in | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'installer.sh.in') diff --git a/installer.sh.in b/installer.sh.in index 84dbcb0..ee1a243 100644 --- a/installer.sh.in +++ b/installer.sh.in @@ -141,6 +141,14 @@ show_disks() { gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" echo "size:${gbytes}GB;sector_size:$sectorsize" done + # cciss(4) devices + for dev in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]$'); do + echo "/dev/cciss/$dev" + size=$(cat /sys/block/cciss\!$dev/size) + sectorsize=$(cat /sys/block/cciss\!$dev/queue/hw_sector_size) + gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))" + echo "size:${gbytes}GB;sector_size:$sectorsize" + done } show_partitions() { @@ -176,6 +184,15 @@ show_partitions() { echo "size:${fssize:-unknown};fstype:${fstype:-none}" fi done + # cciss(4) devices + for part in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]p[0-9]+'); do + fstype=$(lsblk -nfr /dev/cciss/$part|awk '{print $2}') + [ "$fstype" = "crypto_LUKS" ] && continue + [ "$fstype" = "LVM2_member" ] && continue + fssize=$(lsblk -nr /dev/cciss/$part|awk '{print $4}') + echo "$part" + echo "size:${fssize:-unknown};fstype:${fstype:-none}" + done if [ -e /sbin/lvs ]; then # LVM lvs --noheadings|while read lvname vgname perms size; do -- cgit 1.4.1