copr: aws-builder: provide more space for builds
We don't have large root partition enough, and both /tmp and /var/lib/copr-rpmbuild eat the remaing ~3.7G. The swap disk though is large enough, so we can use part of it to mimic the boxes we have in openstack.
This commit is contained in:
parent
982af092ad
commit
a5d8a6233a
1 changed files with 27 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
#!/usr/bin/bash
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
swap_device=
|
swap_device=
|
||||||
|
@ -11,5 +12,29 @@ fi
|
||||||
|
|
||||||
test -n "$swap_device"
|
test -n "$swap_device"
|
||||||
|
|
||||||
mkswap "$swap_device"
|
systemctl unmask tmp.mount
|
||||||
swapon "$swap_device"
|
systemctl start tmp.mount
|
||||||
|
|
||||||
|
|
||||||
|
echo "\
|
||||||
|
n
|
||||||
|
p
|
||||||
|
|
||||||
|
|
||||||
|
+16G
|
||||||
|
n
|
||||||
|
p
|
||||||
|
2
|
||||||
|
|
||||||
|
|
||||||
|
w
|
||||||
|
" | fdisk "$swap_device"
|
||||||
|
|
||||||
|
mkfs.ext4 "${swap_device}p1"
|
||||||
|
|
||||||
|
mount /dev/"$swap_device"p1 /var/lib/copr-rpmbuild
|
||||||
|
chown root:mock /var/lib/copr-rpmbuild
|
||||||
|
chmod 775 /var/lib/copr-rpmbuild
|
||||||
|
|
||||||
|
mkswap "${swap_device}p2"
|
||||||
|
swapon "${swap_device}p2"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue