<?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: Swap file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643853#M20009</link>
    <description>You lost me there.  How do I create a new swap partition within the Linux Gui interface??  Here are my steps or recommnded by previous users;&lt;BR /&gt;1. Create the new swap partition&lt;BR /&gt;2. Change the priority with the FSTAB&lt;BR /&gt;3. Reboot the server&lt;BR /&gt;&lt;BR /&gt;Now, the server should be seeing the new swap partition by running a command "free" - Now, I can safely unmount the old swap partition as my heart desire.&lt;BR /&gt;&lt;BR /&gt;I am correct on these steps??&lt;BR /&gt;&lt;BR /&gt;Thank you you guys for all the help!!&lt;BR /&gt;John</description>
    <pubDate>Tue, 11 Oct 2005 11:52:01 GMT</pubDate>
    <dc:creator>Ian Derringer</dc:creator>
    <dc:date>2005-10-11T11:52:01Z</dc:date>
    <item>
      <title>Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643847#M20003</link>
      <description>Hi,&lt;BR /&gt;I've created this huge swap file for my Itanium server (24GB) and now I read that you were only supposed to create a 2GB swap file. I was wondering if I can create another 2GB swap file out on the SANs and delete the original swap file??  Please help!!&lt;BR /&gt;&lt;BR /&gt;Thank you in advance.&lt;BR /&gt;Ian</description>
      <pubDate>Thu, 06 Oct 2005 21:58:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643847#M20003</guid>
      <dc:creator>Ian Derringer</dc:creator>
      <dc:date>2005-10-06T21:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643848#M20004</link>
      <description>&lt;BR /&gt;You can create any number of Swap files as long as there is hard disk space.&lt;BR /&gt;&lt;BR /&gt;Create a new swap file by:&lt;BR /&gt;* dd if=/dev/zero of=&lt;SWAP-FILE&gt; bs=1m count=2048 (I believe it should work:)&lt;BR /&gt;* Make a swap file system out of it, 'mkswap &lt;SWAP-FILE&gt;'&lt;BR /&gt;* Add this swap to the kernel by 'swapon &lt;SWAP-FILE&gt;'&lt;BR /&gt;&lt;BR /&gt;Now subsequent check to the memory (/proc/meminfo) should have this new swap memory also added to it.&lt;BR /&gt;&lt;BR /&gt;Now coming to deleting the old swap file:&lt;BR /&gt;You have to unmount the swap file before that can be deleted, 'swapoff &lt;SWAP-FILE&gt;'. This will work only if that particular swap-file is not yet used by the kernel to swap.&lt;BR /&gt;&lt;BR /&gt;Otherwise simply you can replace this swap-file entry in /etc/fstab with the new swap file (2GB swap file) and reboot the server, next time kernel will use only this new swap file and you can safely remove the old one.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Gopi&lt;/SWAP-FILE&gt;&lt;/SWAP-FILE&gt;&lt;/SWAP-FILE&gt;&lt;/SWAP-FILE&gt;</description>
      <pubDate>Fri, 07 Oct 2005 00:51:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643848#M20004</guid>
      <dc:creator>Gopi Sekar</dc:creator>
      <dc:date>2005-10-07T00:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643849#M20005</link>
      <description>See also my last recomendation here:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=961656" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=961656&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;And a swap file is different from a swap partition. You can have both.</description>
      <pubDate>Fri, 07 Oct 2005 07:30:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643849#M20005</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-07T07:30:05Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643850#M20006</link>
      <description>Thanks so much for your replies.  Fortunate for me, I do have a SAN attched to this server, which I will create another swap file and spread across the SAN for better IO.  Please let me know if that's acceptable to your standard.&lt;BR /&gt;&lt;BR /&gt;Again, thanks!!</description>
      <pubDate>Fri, 07 Oct 2005 11:00:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643850#M20006</guid>
      <dc:creator>Ian Derringer</dc:creator>
      <dc:date>2005-10-07T11:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643851#M20007</link>
      <description>You won't have another choice unless you are using LVM, or repartition the current disk, but that may involve backup and restore the filesystems on the partitions after the swap partition.&lt;BR /&gt;&lt;BR /&gt;In Tru64 Unix Administration manual, the "recommendation" is to have swap devices locally, not in the SAN. (Will apply to Linux too).&lt;BR /&gt;&lt;BR /&gt;But as swap space is almost never used, and should not be used, I think that won't be a problem.</description>
      <pubDate>Fri, 07 Oct 2005 14:04:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643851#M20007</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-07T14:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643852#M20008</link>
      <description>Another choice is to convert that one big partition that you currently have for swap in a physical volume (LVM), in that pv create a volume group (VG), in the volume gropup create severales 2GB logical volumes (LV), use these logical volumes as swap.</description>
      <pubDate>Mon, 10 Oct 2005 08:11:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643852#M20008</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-10T08:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643853#M20009</link>
      <description>You lost me there.  How do I create a new swap partition within the Linux Gui interface??  Here are my steps or recommnded by previous users;&lt;BR /&gt;1. Create the new swap partition&lt;BR /&gt;2. Change the priority with the FSTAB&lt;BR /&gt;3. Reboot the server&lt;BR /&gt;&lt;BR /&gt;Now, the server should be seeing the new swap partition by running a command "free" - Now, I can safely unmount the old swap partition as my heart desire.&lt;BR /&gt;&lt;BR /&gt;I am correct on these steps??&lt;BR /&gt;&lt;BR /&gt;Thank you you guys for all the help!!&lt;BR /&gt;John</description>
      <pubDate>Tue, 11 Oct 2005 11:52:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643853#M20009</guid>
      <dc:creator>Ian Derringer</dc:creator>
      <dc:date>2005-10-11T11:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643854#M20010</link>
      <description>I don't know a gui tool for configuring swap space. All I know is commands to do that.&lt;BR /&gt;&lt;BR /&gt;First, partition the disk using fdisk or parted.&lt;BR /&gt;&lt;BR /&gt;Then, set the partition type to swap.&lt;BR /&gt;&lt;BR /&gt;Then use mkswap device&lt;BR /&gt;&lt;BR /&gt;Activate the swap&lt;BR /&gt;&lt;BR /&gt;swapon device&lt;BR /&gt;&lt;BR /&gt;Edit fstab and add the new swap device.&lt;BR /&gt;&lt;BR /&gt;If you tellme the device name, I can give you a more detailed instructions.</description>
      <pubDate>Tue, 11 Oct 2005 14:32:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643854#M20010</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-11T14:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643855#M20011</link>
      <description>Unfortunately, I do not have any space on the hard drive to create another swap partition.  Would you recommend creating a swap file on /var and then redo the original swap partition with smaller size??  The server attached to the SAN but I hate to put the swap partition out there permanantly.  I also hate to have to create a swap file vs. swap partition, because the file can be easily corrupted.&lt;BR /&gt;&lt;BR /&gt;What do I do?&lt;BR /&gt;&lt;BR /&gt;Thanks!!</description>
      <pubDate>Wed, 12 Oct 2005 07:47:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643855#M20011</guid>
      <dc:creator>Ian Derringer</dc:creator>
      <dc:date>2005-10-12T07:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643856#M20012</link>
      <description>The option you proposed is valid. If your Linux version supports LVM, you have this choise also.&lt;BR /&gt;&lt;BR /&gt;I will give you an example:&lt;BR /&gt;&lt;BR /&gt;You currently have a swap partition right? Let's assume the following:&lt;BR /&gt;&lt;BR /&gt;/dev/sda1 - boot&lt;BR /&gt;/dev/sda2 - 24GB swap (current)&lt;BR /&gt;/dev/sda3 - / &lt;BR /&gt;/dev/sda4 - /var&lt;BR /&gt;&lt;BR /&gt;Create a new temporary swap in the SAN.&lt;BR /&gt;&lt;BR /&gt;Create a new disk in the SAN, present to the host and configure as swap.&lt;BR /&gt;&lt;BR /&gt;Set this new swap are in the fstab and remove the current. Reboot.&lt;BR /&gt;&lt;BR /&gt;The old swap wont be used after reboot, so, do the following:&lt;BR /&gt;&lt;BR /&gt;pvcreate /dev/sda2&lt;BR /&gt;vgcreate swapvg /dev/sda2&lt;BR /&gt;lvcreate -n swap1lv -L 2048M&lt;BR /&gt;lvcreate -n swap2lv -L 2048M&lt;BR /&gt;lvcreate -n swap3lv -L 2048M&lt;BR /&gt;lvcreate -n swap4lv -L 2048M&lt;BR /&gt;and so forth&lt;BR /&gt;&lt;BR /&gt;Then run:&lt;BR /&gt;&lt;BR /&gt;mkswap /dev/swapvg/swap1lv&lt;BR /&gt;mkswap /dev/swapvg/swap2lv&lt;BR /&gt;mkswap /dev/swapvg/swap3lv&lt;BR /&gt;mkswap /dev/swapvg/swap4lv&lt;BR /&gt;and so forth&lt;BR /&gt;&lt;BR /&gt;Then edit fstab, remove the temporary swap area created in the san, and add the /dev/swapvg/swap*lv devices as swap devices.&lt;BR /&gt;&lt;BR /&gt;Reboot.&lt;BR /&gt;&lt;BR /&gt;In this way, using your current partition, you can create various partitions (logical volumes) without destroying any data.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.</description>
      <pubDate>Wed, 12 Oct 2005 08:30:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643856#M20012</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-12T08:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Swap file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643857#M20013</link>
      <description>Of course, if you have enough maintenance time, you can disable the actual swap by removing the entry from the fstab and rebooting the server, then issue the commands above. You don't really need a new temp swap partition.</description>
      <pubDate>Wed, 12 Oct 2005 14:46:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/swap-file/m-p/3643857#M20013</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2005-10-12T14:46:43Z</dc:date>
    </item>
  </channel>
</rss>

