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 ?

link|improve this question

80% accept rate
feedback

1 Answer

up vote 2 down vote accepted

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

/dev/rootvg/swap2           none        swap        sw          0 0
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.