Additional swap created on a new partition gets removed on reboot

1

I have created a new swap volume using logical volume management tool on RHEL. Suppose the volume is /dev/rootvg/swap2

I did mkswamp /dev/rootvg/swap2 and then swapon /dev/rootvg/swap2 when listing swap space, using swapon -s - i see my new swap space.

However this gets removed the time the server is restarted or if I do a swapoff -a and then a swapon -a. What is missing. Am I to make a manual entry to /etc/fstab ? If so how does it look ?

ring bearer

Posted 2011-11-04T21:28:54.573

Reputation: 329

Answers

2

Yes, put it in /etc/fstab, like so:

/dev/rootvg/swap2           none        swap        sw          0 0

SleighBoy

Posted 2011-11-04T21:28:54.573

Reputation: 2 066