Update reclaim disk space script

The script uses systemd-run, which does the job in background.
We should take the the time and wait for the job to finish.

Maybe some functional tests suffer from not really freed disk
space and fail because of this.

We also add some trimming in the end of the script.

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14554
This commit is contained in:
Tino Reichardt 2023-03-01 21:25:09 +01:00 committed by GitHub
parent 3a7c35119e
commit 0f9ed58f43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ set -eu
sudo systemd-run docker system prune --force --all --volumes
# remove unused software
sudo systemd-run rm -rf \
sudo systemd-run --wait rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/* \
/usr/local/* \
@ -18,3 +18,6 @@ sudo systemd-run rm -rf \
/var/lib/gems \
/var/lib/mysql \
/var/lib/snapd
# trim the cleaned space
sudo fstrim /