<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to add swap size? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791360#M2277</link>
    <description>Thanks for your tips.&lt;BR /&gt;&lt;BR /&gt;But if I have no free disk to create partition,&lt;BR /&gt;how could I do?&lt;BR /&gt;&lt;BR /&gt;All the disks are created mount point,&lt;BR /&gt;But I have enough free space in /u02,&lt;BR /&gt;&lt;BR /&gt;Can you help me? Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.</description>
    <pubDate>Thu, 22 Aug 2002 02:52:25 GMT</pubDate>
    <dc:creator>violin_1</dc:creator>
    <dc:date>2002-08-22T02:52:25Z</dc:date>
    <item>
      <title>How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791358#M2275</link>
      <description>Hello ,&lt;BR /&gt;&lt;BR /&gt;I have a Linpus Linux release 6.4 , &lt;BR /&gt;Yesterday I added 512M RAM on the server ,&lt;BR /&gt;&lt;BR /&gt;but I don't know how to add swap size ,&lt;BR /&gt;I did some tests but failed , &lt;BR /&gt;(I've crushed 2 test servers.)&lt;BR /&gt;&lt;BR /&gt;I uploaded the testing steps ,&lt;BR /&gt;And I know maybe I make mistakes in mkswap or swapon ,&lt;BR /&gt;&lt;BR /&gt;Should somebody help me to add swap size?&lt;BR /&gt;&lt;BR /&gt;Or should I enlarge /dev/hdb1 size?&lt;BR /&gt;like :&lt;BR /&gt;mkswap -v1 /dev/hdb2 128512  &lt;BR /&gt;and then :&lt;BR /&gt;swapon -v -p -1 /dev/hdb2&lt;BR /&gt;&lt;BR /&gt;Need helps,&lt;BR /&gt;&lt;BR /&gt;Thanks billions!&lt;BR /&gt;&lt;BR /&gt;Violin.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 02:23:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791358#M2275</guid>
      <dc:creator>violin_1</dc:creator>
      <dc:date>2002-08-22T02:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791359#M2276</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;You can not "extend" the current swap partition, instead you can create another partion then add it to additional swap.&lt;BR /&gt;You can add the swap partition on hda or hdb.&lt;BR /&gt;&lt;BR /&gt;&amp;gt; # mkswap -v0 /dev/hda1 128512&lt;BR /&gt;This command will initialize your "live" OS partition to swap partition. That's why you crashed the system.&lt;BR /&gt;&lt;BR /&gt;So what you need is&lt;BR /&gt;1) Create new partition&lt;BR /&gt;2) reboot the system to make the new partition ready to use from the system.&lt;BR /&gt;3) mkswap /dev/hdXXX  is just OK.  &lt;BR /&gt;The default is swap version 1 (new style swap area)&lt;BR /&gt;And you don't need to put the size. The partition will be initialized as swap&lt;BR /&gt;4) put one line into /etc/fstab&lt;BR /&gt;5) swapon -a&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 02:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791359#M2276</guid>
      <dc:creator>I_M</dc:creator>
      <dc:date>2002-08-22T02:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791360#M2277</link>
      <description>Thanks for your tips.&lt;BR /&gt;&lt;BR /&gt;But if I have no free disk to create partition,&lt;BR /&gt;how could I do?&lt;BR /&gt;&lt;BR /&gt;All the disks are created mount point,&lt;BR /&gt;But I have enough free space in /u02,&lt;BR /&gt;&lt;BR /&gt;Can you help me? Thanks again.&lt;BR /&gt;&lt;BR /&gt;Violin.</description>
      <pubDate>Thu, 22 Aug 2002 02:52:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791360#M2277</guid>
      <dc:creator>violin_1</dc:creator>
      <dc:date>2002-08-22T02:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791361#M2278</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;If you don't have additional space for new partition, use "swap on filesystem".&lt;BR /&gt;&lt;BR /&gt;Following example is how to create 500mb swap on filesystem.&lt;BR /&gt;&lt;BR /&gt;# dd if=/dev/zero of=swapfile bs=1024k count=500&lt;BR /&gt;&lt;BR /&gt;This command will create 500mb file. Make sure you put "count" otherwise you will make your filesystem full.&lt;BR /&gt;&lt;BR /&gt;# mkswap swapfile&lt;BR /&gt;&lt;BR /&gt;# chmod 0600 swapfile&lt;BR /&gt;&lt;BR /&gt;Edit /etc/fstab &lt;BR /&gt;/swapfile   swap   swap  defaults  0 0&lt;BR /&gt;&lt;BR /&gt;# free&lt;BR /&gt;&lt;BR /&gt;# swapon -a&lt;BR /&gt;&lt;BR /&gt;# free    (to confirm your system use the new swap)&lt;BR /&gt;&lt;BR /&gt;"dd" will kill your system, if you forget options. Be careful!!&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2002 05:01:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791361#M2278</guid>
      <dc:creator>I_M</dc:creator>
      <dc:date>2002-08-22T05:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791362#M2279</link>
      <description>And question again,&lt;BR /&gt;&lt;BR /&gt;If I add more memory , could I use dd again?&lt;BR /&gt;&lt;BR /&gt;like:&lt;BR /&gt;&lt;BR /&gt;dd if=/dev/zero of=swapfile1 bk=1024k count=500&lt;BR /&gt;&lt;BR /&gt;Could I?&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Fri, 23 Aug 2002 02:29:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791362#M2279</guid>
      <dc:creator>violin_1</dc:creator>
      <dc:date>2002-08-23T02:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add swap size?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791363#M2280</link>
      <description>Hello again,&lt;BR /&gt;&lt;BR /&gt;Yes, you can create additional "swap on filesystem" and mkswap then enable it.&lt;BR /&gt;&lt;BR /&gt;I am not sure how many swaps you can create in a system, but the max swap partition size is 2gb. so I guess a max-swap-file-size would be the same 2gb.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Aug 2002 02:54:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-swap-size/m-p/2791363#M2280</guid>
      <dc:creator>I_M</dc:creator>
      <dc:date>2002-08-23T02:54:30Z</dc:date>
    </item>
  </channel>
</rss>

