Title: someone who knows centOS 6 please help me. Post by: kodtycoon on December 28, 2014, 02:51:48 AM yes i know this if totally off topic but please dont shoot me. im on the very last hurdle after a 24 hour binge of learning linux from scratch to do this so im way too tired to set up an account anywhere else to post the problem. (mods move this to where ever appropriate if needed)
im configuring a server and im using these lines of code: Code: iptables -D INPUT 1 the code goes in fine, but after reboot of the server, swappiness is still at 10. /swapfile is still saved in /fstab, java is still on it as are the iptable settings, but the swap disk(indented line) vanishes ie when i do "swapon -s" nothing is there. isnt saving /swapfile into /fstab and/or setting vm.swappiness=10 supposed to make it permanent? Title: Re: someone who knows centOS 6 please help me. Post by: moni3z on December 28, 2014, 03:42:19 AM yes i know this if totally off topic but please dont shoot me. im on the very last hurdle after a 24 hour binge of learning linux from scratch to do this so im way too tired to set up an account anywhere else to post the problem. (mods move this to where ever appropriate if needed) im configuring a server and im using these lines of code: Code: iptables -D INPUT 1 the code goes in fine, but after reboot of the server, swappiness is still at 10. /swapfile is still saved in /fstab, java is still on it as are the iptable settings, but the swap disk(indented line) vanishes ie when i do "swapon -s" nothing is there. isnt saving /swapfile into /fstab and/or setting vm.swappiness=10 supposed to make it permanent? I don't use CentOS but https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-centos-6 /etc/fstab seems it should be: /swapfile swap swap defaults 0 0 edit: man fstab confirms digital ocean guide is correct http://linux.die.net/man/5/fstab Title: Re: someone who knows centOS 6 please help me. Post by: Flashman on December 28, 2014, 03:51:30 AM No linux guru, just a meddler, but two thoughts, don't you have to mount it? annnd not sure if you're complaining of lack of swapping to swapfile, which might not happen until you run out of RAM.
Title: Re: someone who knows centOS 6 please help me. Post by: Flashman on December 28, 2014, 04:29:22 AM Oh right, and it won't come back with swapon /swapfile ? because that is a non-persistent command needs to be run on boot.
Title: Re: someone who knows centOS 6 please help me. Post by: Bitsky on December 28, 2014, 09:02:14 AM Try that. You have an error in your fstab; and setting up iptables like this just calls for errors.
Code: cp /etc/sysconfig/iptables /etc/sysconfig/iptables.org Title: Re: someone who knows centOS 6 please help me. Post by: Bitsky on December 29, 2014, 08:52:32 AM Don't run it as part of the normal boot process, because it will add entries to sysctl.conf and fstab each time.
And my bad, I forgot to correct the fstab line you had wrong, sorry :-[ I had the correct entry in my fstab where it works fine. You shouldn't need any extra steps after that. Since it's in fstab it should come up right during boot. Try this one: Code: /swapfile swap swap defaults 0 0 |