diff options
author | Simon Rettberg | 2013-12-05 17:23:27 +0100 |
---|---|---|
committer | Simon Rettberg | 2013-12-05 17:23:27 +0100 |
commit | 321300b28909e9f50d53904a0f3f700375f9ac47 (patch) | |
tree | c486044dd0db84345b4bd55e9e653948ae8be229 /remote/rootfs/rootfs-stage32/data | |
parent | Merge branch 'master' of dnbd3:openslx-ng/tm-scripts (diff) | |
download | tm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.tar.gz tm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.tar.xz tm-scripts-321300b28909e9f50d53904a0f3f700375f9ac47.zip |
[rfs-stage32] Fix zram swap creation for > 32 CPUs
zram can only handle 32 devices, so the script broke with 40 cpu cores
Diffstat (limited to 'remote/rootfs/rootfs-stage32/data')
-rwxr-xr-x | remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions index a5c2ece7..362e8f14 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions @@ -173,6 +173,7 @@ CPUS=$(grep -c -E "^processor.*[0-9]+$" /proc/cpuinfo) if [ -z "$CPUS" ]; then echo "ERROR: Could not determine CPU core count" else + [ "$CPUS" -gt "16" ] && CPUS=16 # zram can only handle up to 32 devices, the system can apparently even just handle 29 swap partitions, so use a reasonable upper limit if ! modprobe zram "num_devices=$CPUS"; then echo "ERROR: Could not load zram module" else |