copr-builders: allow using /dev/vdd for swap, too
This commit is contained in:
parent
95753ed1f9
commit
7c7da8beda
1 changed files with 15 additions and 5 deletions
|
@ -6,14 +6,24 @@ set -e
|
|||
part_suffix=p
|
||||
swap_device=
|
||||
if test -e /dev/xvda1 && test -e /dev/nvme0n1; then
|
||||
# AWS aarch64 machine. We use separate volume allocation as the default
|
||||
# root disk in our instance type is too small.
|
||||
swap_device=/dev/nvme0n1
|
||||
elif test -e /dev/nvme1n1; then
|
||||
# AWS machine
|
||||
# AWS x86_64 machine. There's >= 400G space on the default volume in our
|
||||
# instance type.
|
||||
swap_device=/dev/nvme1n1
|
||||
elif test -e /dev/vdb; then
|
||||
# libvirt machine, and IBM Cloud s390x
|
||||
swap_device=/dev/vdb
|
||||
part_suffix=
|
||||
else
|
||||
# LibVirt (on-premise) machine, or the IBM Cloud machine. Find the "large"
|
||||
# volume, that one will be used.
|
||||
for vol in /dev/vdb /dev/vdd; do
|
||||
mount | grep $vol && continue
|
||||
size=$(blockdev --getsize64 "$vol")
|
||||
test "$size" -le 150000000000 && continue
|
||||
swap_device=$vol
|
||||
part_suffix=
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
test -n "$swap_device"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue