LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Do I have a problem with my swap filesystem? (https://www.linuxquestions.org/questions/linux-newbie-8/do-i-have-a-problem-with-my-swap-filesystem-342363/)

terrier77 07-12-2005 02:39 AM

Do I have a problem with my swap filesystem?
 
Hello,

Wonder if someone can help. Sysadmin stuff is not exactly my forte - so please excuse my ignorance here...

When I execute swapon -s to look at configured swap I see the following:

1:server1:# swapon -s
Filename Type Size Used Priority
/dev/rootvg/swap (deleted) partition 8388600 0 -1


'free' and examination of top and vmstat indicates that no swap is in use (There is plenty of memory).

Now, is this swap not in use at all because there is problem with it. I think even with tons of memory installed you would still see a bit of activity to the swapfile.

Deleted certainly sounds suspicious to me. I cannot seem to find anything on what deleted means in the context of swap. Common sense of course tells me its been...err deleted. /dev/rootvg/swap does still exist but Im not sure how to verify this properly (looks like Linux LVM has been used and am not really up to speed with this yet)

If anyone can clarify this I'd be grateful,

Thanks

Tim

Gay R0b0t 07-12-2005 02:56 AM

look in /etc/fstab and see if there is line like:
Code:

/dev/hda3    swap    swap    *options*  0 0
If not add one, replacing hda3 with the partition your swap is, and the options with anything you like, mine are "pri=42" but I don't know what that means. Look at a partitioning site for information about options.

Edit: Gentoo handbook recommends replacing the first "swap" with "none" and "*options*" with "sw". ie:
Code:

/dev/hda3    none    swap    sw    0 0

terrier77 07-12-2005 04:18 AM

Thanks Chris,

I've got the following in /etc/fstab

/dev/rootvg/swap swap swap defaults 0 0

I think this looks ok?

Tim

Gay R0b0t 07-12-2005 05:06 AM

put a hash (#) before that line, and create a new one that looks exactly the same, except that the '/dev/rootvg/swap' bit is replaced with the partition number. '/dev/hda3' if partition 3.

then save and reboot. See if this solves your problem.
When you said:
Quote:

examination of top and vmstat indicates that no swap is in use (There is plenty of memory)
did you mean that there was swap available, but none is being used; or that there is simply no swap available but plenty of RAM?

terrier77 07-12-2005 05:48 AM

Thanks Chris,

According to free -m there is plent of swap available just zero used.


total used free shared buffers cached
Mem: 7786 3310 4476 0 196 2112
-/+ buffers/cache: 1002 6784
Swap: 8191 0 8191



Will see if I can try your suggestion - trouble is the old familar situation is that I'll need to schedule a time to do it as its in a sort of semi-live status at the moment.

Cheers,

Tim


All times are GMT -5. The time now is 02:58 AM.