Linux System Administration
Filesystems
Ooops! I did it again!
What if I forgot to install a swap space when I installed Linux?
Swap space is not needed, but it is useful.
What if I want to add another swap space to my system?
It's OK. You can have up to 8.
How do I do it?
Use fdisk (or some similar utility) to make a new partition
Set the partition type to swap (82 in fdisk).
Use the mkswap command:
mkswap <options> partition
mkswap -v1 /dev/hda7
Edit /etc/fstab to reflect the new swap space
Turn on the swap (or reboot if you editted /etc/fstab) with the swapon command
swapon <options>
swapon -a
(reads fstab and turns on all the swap partitions listed)
Check the status (optional)
swapon -s
Limitations to swap space?
Prev
Page 13 Next