<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Linux Add a Swap File &#8211; Howto</title> <atom:link href="http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/feed/" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/</link> <description>Every answer asks a more beautiful question.</description> <lastBuildDate>Fri, 10 Feb 2012 19:55:56 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: John Mills</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-66416</link> <dc:creator>John Mills</dc:creator> <pubDate>Thu, 05 Jan 2012 15:58:45 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-66416</guid> <description>dd is a command that does a low level copy of data from a to b.  &#039;if&#039; is the input file for the copy.  /dev/zero is a device that generates as many null characters as it is asked to create and passes them on.  &#039;of&#039; is your output file or what will become your new (or additional) swapfile.  the &#039;/swapfile&#039; could be any name that you want it to be as long as you don&#039;t forget what it is for the further manipulations.  &#039;bs&#039; is the block size of the file and &#039;count&#039; is the number of bytes in the file.  So, what the command does is takes 524288 null bytes from /dev/zero and puts them into /swapfile thus initially populating the file.</description> <content:encoded><![CDATA[<p>dd is a command that does a low level copy of data from a to b.  &#8216;if&#8217; is the input file for the copy.  /dev/zero is a device that generates as many null characters as it is asked to create and passes them on.  &#8216;of&#8217; is your output file or what will become your new (or additional) swapfile.  the &#8216;/swapfile&#8217; could be any name that you want it to be as long as you don&#8217;t forget what it is for the further manipulations.  &#8216;bs&#8217; is the block size of the file and &#8216;count&#8217; is the number of bytes in the file.  So, what the command does is takes 524288 null bytes from /dev/zero and puts them into /swapfile thus initially populating the file.</p> ]]></content:encoded> </item> <item><title>By: ravinder</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-66372</link> <dc:creator>ravinder</dc:creator> <pubDate>Wed, 04 Jan 2012 20:15:53 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-66372</guid> <description>dd if=/dev/zero of=/swapfile1 bs=1024 count=524288
pls tell me the meaning and function of this command..why we are using if=/dev/zero and of=/swapfile..why this command started with dd..</description> <content:encoded><![CDATA[<p>dd if=/dev/zero of=/swapfile1 bs=1024 count=524288<br
/> pls tell me the meaning and function of this command..why we are using if=/dev/zero and of=/swapfile..why this command started with dd..</p> ]]></content:encoded> </item> <item><title>By: Simon McNair</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-63926</link> <dc:creator>Simon McNair</dc:creator> <pubDate>Thu, 27 Oct 2011 14:45:38 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-63926</guid> <description>Hi Vivek,
5 years on and the page is still useful.  Thanks :-)</description> <content:encoded><![CDATA[<p>Hi Vivek,<br
/> 5 years on and the page is still useful.  Thanks :-)</p> ]]></content:encoded> </item> <item><title>By: Ron</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-63314</link> <dc:creator>Ron</dc:creator> <pubDate>Sun, 09 Oct 2011 07:10:27 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-63314</guid> <description>Since kernel 2.6.31, you can use the util fallocate instead of dd on btrfs, ext4, ocfs2, and xfs filesystems.  It&#039;s *much* faster than dd on really big swap files.</description> <content:encoded><![CDATA[<p>Since kernel 2.6.31, you can use the util fallocate instead of dd on btrfs, ext4, ocfs2, and xfs filesystems.  It&#8217;s *much* faster than dd on really big swap files.</p> ]]></content:encoded> </item> <item><title>By: John M</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-61980</link> <dc:creator>John M</dc:creator> <pubDate>Mon, 29 Aug 2011 03:09:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-61980</guid> <description>You just have to:
-make sure the swap file is not active
swapon -s
-if it is active
swapoff /swapfile (or whatever you called it)
-comment out the line in your /etc/fstab file (Place a hashmark # in front of it or just delete the line)
-remove the swapfile:
rm /swapfile (or whatever you called it)
Reboot and you should be away unless you want to create a smaller swap file in which case you should just make sure it isn&#039;t in use, delete the file and recreate it using a smaller size.</description> <content:encoded><![CDATA[<p>You just have to:<br
/> -make sure the swap file is not active<br
/> swapon -s<br
/> -if it is active<br
/> swapoff /swapfile (or whatever you called it)<br
/> -comment out the line in your /etc/fstab file (Place a hashmark # in front of it or just delete the line)<br
/> -remove the swapfile:<br
/> rm /swapfile (or whatever you called it)</p><p>Reboot and you should be away unless you want to create a smaller swap file in which case you should just make sure it isn&#8217;t in use, delete the file and recreate it using a smaller size.</p> ]]></content:encoded> </item> <item><title>By: Adam</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-61288</link> <dc:creator>Adam</dc:creator> <pubDate>Thu, 04 Aug 2011 03:18:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-61288</guid> <description>So, after following these steps I received the notification that my root partition is full. And then, after rebooting, I cannot log into gnome. It will start gdm but will not go into gnome from there, it will only bring me back to gdm. startx does not work as well. So how do I do the oposite of this?</description> <content:encoded><![CDATA[<p>So, after following these steps I received the notification that my root partition is full. And then, after rebooting, I cannot log into gnome. It will start gdm but will not go into gnome from there, it will only bring me back to gdm. startx does not work as well. So how do I do the oposite of this?</p> ]]></content:encoded> </item> <item><title>By: Andrew</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-60861</link> <dc:creator>Andrew</dc:creator> <pubDate>Wed, 20 Jul 2011 03:25:46 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-60861</guid> <description>+1 to Thomas suggestion.
You MUST chmod 600 /swapfile1. Otherwise your box will get owned!
http://www.juniper.net/security/auto/vulnerabilities/vuln2678.html</description> <content:encoded><![CDATA[<p>+1 to Thomas suggestion.</p><p>You MUST chmod 600 /swapfile1. Otherwise your box will get owned!</p><p><a
href="http://www.juniper.net/security/auto/vulnerabilities/vuln2678.html" rel="nofollow">http://www.juniper.net/security/auto/vulnerabilities/vuln2678.html</a></p> ]]></content:encoded> </item> <item><title>By: Vlad</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-60334</link> <dc:creator>Vlad</dc:creator> <pubDate>Wed, 29 Jun 2011 15:19:08 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-60334</guid> <description>great post!</description> <content:encoded><![CDATA[<p>great post!</p> ]]></content:encoded> </item> <item><title>By: Thomas</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-47159</link> <dc:creator>Thomas</dc:creator> <pubDate>Mon, 03 May 2010 09:27:10 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-47159</guid> <description>Great howto!
After creating the swap file its permissions should be set so that only root can access the file:
chmod 600 /swapfile1</description> <content:encoded><![CDATA[<p>Great howto!</p><p>After creating the swap file its permissions should be set so that only root can access the file:</p><p>chmod 600 /swapfile1</p> ]]></content:encoded> </item> <item><title>By: luckyrams</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-46235</link> <dc:creator>luckyrams</dc:creator> <pubDate>Wed, 03 Mar 2010 14:08:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-46235</guid> <description>Thanks! I&#039;m newbie to Linux, It helped me in time.</description> <content:encoded><![CDATA[<p>Thanks! I&#8217;m newbie to Linux, It helped me in time.</p> ]]></content:encoded> </item> <item><title>By: Primoz</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-45531</link> <dc:creator>Primoz</dc:creator> <pubDate>Tue, 12 Jan 2010 18:37:21 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-45531</guid> <description>Hi!
First I must say thanks for a great how to.
And secondly, I&#039;m referencing it in Arch Linux wiki how to create swap file.
Hope you agree with it.
If not please contact me.
Link: http://wiki.archlinux.org/index.php/HOWTO_Create_swap_file</description> <content:encoded><![CDATA[<p>Hi!<br
/> First I must say thanks for a great how to.<br
/> And secondly, I&#8217;m referencing it in Arch Linux wiki how to create swap file.<br
/> Hope you agree with it.<br
/> If not please contact me.<br
/> Link: <a
href="http://wiki.archlinux.org/index.php/HOWTO_Create_swap_file" rel="nofollow">http://wiki.archlinux.org/index.php/HOWTO_Create_swap_file</a></p> ]]></content:encoded> </item> <item><title>By: Gen2ly</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-45041</link> <dc:creator>Gen2ly</dc:creator> <pubDate>Sat, 05 Dec 2009 02:39:25 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-45041</guid> <description>Set swap priority:
• Swapiness is the priority of input/output for swap.  To look the current value:
cat /proc/sys/vm/swappiness
To change the swap priority (lower value means less swapping):
sysctl vm.swappiness=10
To have this value set at boot add it to /etc/sysctl.conf
vm.swappiness=0</description> <content:encoded><![CDATA[<p>Set swap priority:</p><p>• Swapiness is the priority of input/output for swap.  To look the current value:<br
/> cat /proc/sys/vm/swappiness</p><p>To change the swap priority (lower value means less swapping):<br
/> sysctl vm.swappiness=10</p><p>To have this value set at boot add it to /etc/sysctl.conf<br
/> vm.swappiness=0</p> ]]></content:encoded> </item> <item><title>By: acidtoi</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-44536</link> <dc:creator>acidtoi</dc:creator> <pubDate>Tue, 10 Nov 2009 01:12:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-44536</guid> <description>hi,
i&#039;m about to install ubuntu karmic on a new computer with thre sata hard drives.
I usually allocate a little more of current ram in swap partition (5 gigas) so I can safely hibernate, but on a post I read in FreeBSD forums there&#039;s a link to FreeBSD manual where states there should be a swap partition for every disk, not just one swap for the whole system.
So, I know Linux is not *BSD but I wonder if the same is applicable here because installing a swap of 5 gigs in all three sata seems a waste of space to me!
cheers!</description> <content:encoded><![CDATA[<p>hi,<br
/> i&#8217;m about to install ubuntu karmic on a new computer with thre sata hard drives.</p><p>I usually allocate a little more of current ram in swap partition (5 gigas) so I can safely hibernate, but on a post I read in FreeBSD forums there&#8217;s a link to FreeBSD manual where states there should be a swap partition for every disk, not just one swap for the whole system.</p><p>So, I know Linux is not *BSD but I wonder if the same is applicable here because installing a swap of 5 gigs in all three sata seems a waste of space to me!</p><p>cheers!</p> ]]></content:encoded> </item> <item><title>By: Alex</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-41145</link> <dc:creator>Alex</dc:creator> <pubDate>Fri, 10 Apr 2009 19:45:11 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-41145</guid> <description>Thank you for the guide; I&#039;d like to add another detail. In this line one may choose to use other units to make things more simple:
&lt;blockquote&gt;# dd if=/dev/zero of=/swapfile1 bs=1024 count=524288&lt;/blockquote&gt;
You can turn it into:
&lt;blockquote&gt;# dd if=/dev/zero of=/swapfile1 bs=1M count=512&lt;/blockquote&gt;
This means that the block size is 1 MB, so count=512 means &quot;I need 512 megs&quot;, there is no need to do any other calculations.</description> <content:encoded><![CDATA[<p>Thank you for the guide; I&#8217;d like to add another detail. In this line one may choose to use other units to make things more simple:</p><blockquote><p># dd if=/dev/zero of=/swapfile1 bs=1024 count=524288</p></blockquote><p>You can turn it into:</p><blockquote><p># dd if=/dev/zero of=/swapfile1 bs=1M count=512</p></blockquote><p>This means that the block size is 1 MB, so count=512 means &#8220;I need 512 megs&#8221;, there is no need to do any other calculations.</p> ]]></content:encoded> </item> <item><title>By: Mosab</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-37861</link> <dc:creator>Mosab</dc:creator> <pubDate>Wed, 07 May 2008 18:29:01 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-37861</guid> <description>Thanks, I have been looking for the last step for months heh.</description> <content:encoded><![CDATA[<p>Thanks, I have been looking for the last step for months heh.</p> ]]></content:encoded> </item> <item><title>By: asdffdsa</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-36918</link> <dc:creator>asdffdsa</dc:creator> <pubDate>Sat, 20 Oct 2007 08:25:31 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-36918</guid> <description>Thanks for the help.  But how would I go about deleting this swapfile?  Also, how does creating a swapfile this way differ from creating a separate partition for one?  I only ask because I would like to have multiple installs of linux on my system, and I would like them to share the same swapfile.
Recently, I&#039;ve been trying to create a swapfile partition and it&#039;s not being recognized, so I&#039;ve been having trouble.</description> <content:encoded><![CDATA[<p>Thanks for the help.  But how would I go about deleting this swapfile?  Also, how does creating a swapfile this way differ from creating a separate partition for one?  I only ask because I would like to have multiple installs of linux on my system, and I would like them to share the same swapfile.</p><p>Recently, I&#8217;ve been trying to create a swapfile partition and it&#8217;s not being recognized, so I&#8217;ve been having trouble.</p> ]]></content:encoded> </item> <item><title>By: some_guy</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-36385</link> <dc:creator>some_guy</dc:creator> <pubDate>Fri, 01 Jun 2007 02:35:28 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-36385</guid> <description>If you don&#039;t want to reboot the machine to enable the new swapfile, after step f) you can issue these commands:
swapoff -a
swapon -a
to first stop and then start all swaps in /etc/fstab</description> <content:encoded><![CDATA[<p>If you don&#8217;t want to reboot the machine to enable the new swapfile, after step f) you can issue these commands:</p><p>swapoff -a<br
/> swapon -a</p><p>to first stop and then start all swaps in /etc/fstab</p> ]]></content:encoded> </item> <item><title>By: nixcraft</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-8088</link> <dc:creator>nixcraft</dc:creator> <pubDate>Wed, 17 Jan 2007 22:16:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-8088</guid> <description>anon,
Thanks for heads up!</description> <content:encoded><![CDATA[<p>anon,</p><p>Thanks for heads up!</p> ]]></content:encoded> </item> <item><title>By: anon</title><link>http://www.cyberciti.biz/faq/linux-add-a-swap-file-howto/#comment-8087</link> <dc:creator>anon</dc:creator> <pubDate>Wed, 17 Jan 2007 22:00:47 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/faq/faq/linux-add-a-swap-file-howto.php#comment-8087</guid> <description>TYPO: vi /etc/fstatb
It should be fstab</description> <content:encoded><![CDATA[<p>TYPO: vi /etc/fstatb<br
/> It should be fstab</p> ]]></content:encoded> </item> </channel> </rss>
