If your system is not out of control, but needs more swap after some time, it is possible
to extend the swap space online. If you prepared a partition for swap space, just add
this partition with YaST. If you do not have a partition available, you may also just use
a swap le to extend the swap. Swap les are generally slower than partitions, but
compared to physical ram, both are extremely slow so the actual difference is negligible.
Procedure 3.2:
Adding a Swap File Manually
To add a swap le in the running system, proceed as follows:
1
Create an empty le in your system. For example, if you want to add a swap le
with 128 MB swap at /var/lib/swap/swapfile, use the commands:
mkdir -p /var/lib/swap
dd if=/dev/zero of=/var/lib/swap/swapfile bs=1M count=128
2
Initialize this swap le with the command
mkswap /var/lib/swap/swapfile
3
Activate the swap with the command
swapon /var/lib/swap/swapfile
To disable this swap le, use the command
swapoff /var/lib/swap/swapfile
4
Check the current available swap spaces with the command
cat /proc/swaps
Note that at this point, it is only temporary swap space. After the next reboot, it is
no longer utilized.
5
To enable this swap le permanently, add the following line to /etc/fstab:
/var/lib/swap/swapfile swap swap defaults 0 0
3.1.7 Partitioning and LVM
From the Expert partitioner, access the LVM conguration by clicking the Volume
Management item in the System View pane. However, if a working LVM conguration
Advanced Disk Setup 83