1846576 Members
2134 Online
110256 Solutions
New Discussion

swapinfo

 
navin
Super Advisor

swapinfo

hello All,
I have a very limited free disk space but having lot of space in my root filesystem, i have been suggested to go with the below command inorder to use the space in / for swap.But usually in other platforms we create the file and add that to swap. So i just would like to double check the below script is good or not
swapon -m 12288M -l 12288M /
please advice
thanks
Learning ...
4 REPLIES 4
TTr
Honored Contributor

Re: swapinfo

The command looks correct but on a few tests I did, the -m and -l are mutually exclusive. The man page does not mention anything like that. Maybe because the host I tried this on uses vxfs as the fs type for /. You should add the -p option so that the lvol2 is used first and / is used second. You should also add an entry in /etc/fstab to activate this at boot time if it is required.
But before you do this, what is the objective here? Why do you need to add filesystem swap? Perhaps you are heading in the wrong direction.
Venkatesh BL
Honored Contributor

Re: swapinfo

Lookup "man 1m swapon" to understand the options being used.

Also, note that file system swap is a work-around, not a solution. Performance wise, disk swap is any day better than fs swap.
Dennis Handly
Acclaimed Contributor

Re: swapinfo

>So i just would like to double check the below script is good or not

You can also use SAM to add filesystem swap.
Asif Sharif
Honored Contributor

Re: swapinfo