History

installer: detect ciss(4) devices/partitions correctly (#44).

Juan RP committed 11 years ago

Commit 8261f901 parent cb2510b1 file · +17 −0Browse files

Unified · Split

installer.sh.in+17−0
@@ -141,6 +141,14 @@ show_disks() { · 140 unmodified lines
141 gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"141 gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"
142 echo "size:${gbytes}GB;sector_size:$sectorsize"142 echo "size:${gbytes}GB;sector_size:$sectorsize"
143 done143 done
144 # cciss(4) devices
145 for dev in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]$'); do
146 echo "/dev/cciss/$dev"
147 size=$(cat /sys/block/cciss\!$dev/size)
148 sectorsize=$(cat /sys/block/cciss\!$dev/queue/hw_sector_size)
149 gbytes="$(($size * $sectorsize / 1024 / 1024 / 1024))"
150 echo "size:${gbytes}GB;sector_size:$sectorsize"
151 done
144}152}
145 153
146show_partitions() {154show_partitions() {
@@ -176,6 +184,15 @@ show_partitions() { · 29 unmodified lines
176 echo "size:${fssize:-unknown};fstype:${fstype:-none}"184 echo "size:${fssize:-unknown};fstype:${fstype:-none}"
177 fi185 fi
178 done186 done
187 # cciss(4) devices
188 for part in $(ls /dev/cciss|grep -E 'c[0-9]d[0-9]p[0-9]+'); do
189 fstype=$(lsblk -nfr /dev/cciss/$part|awk '{print $2}')
190 [ "$fstype" = "crypto_LUKS" ] && continue
191 [ "$fstype" = "LVM2_member" ] && continue
192 fssize=$(lsblk -nr /dev/cciss/$part|awk '{print $4}')
193 echo "$part"
194 echo "size:${fssize:-unknown};fstype:${fstype:-none}"
195 done
179 if [ -e /sbin/lvs ]; then196 if [ -e /sbin/lvs ]; then
180 # LVM197 # LVM
181 lvs --noheadings|while read lvname vgname perms size; do198 lvs --noheadings|while read lvname vgname perms size; do

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t