<?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: Increase in swap space. in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984833#M27969</link>
    <description>Hi Bhaski,&lt;BR /&gt;&lt;BR /&gt;from the output of your vgdisplay -v system&lt;BR /&gt;one can see that you have plenty of unused PEs (over 67 GB).&lt;BR /&gt;So you could well create a new volume of 4 GB that you could use for swap.&lt;BR /&gt;However, unless the developers of the block device and LVM code haven't fixed this yet,&lt;BR /&gt;the general consensus has been that it performance wise was a bad idea to pu a swap device on an LVM volume.&lt;BR /&gt;But nevertheless it does work.&lt;BR /&gt;We have forcedly done this because unlike you we really ran short of unused disk space.&lt;BR /&gt;&lt;BR /&gt;So you could do this&lt;BR /&gt;&lt;BR /&gt;# lvcreate -L 4g -n lv_secswap system&lt;BR /&gt;&lt;BR /&gt;Btw, a bad name for a VG "system", or was that name chosen by the Yast installer?&lt;BR /&gt;They at least should have prepended something like "vg".&lt;BR /&gt;With Linux LVM you can change a VG's (and LV's) name a postiori (unlike with HP-UX LVM)&lt;BR /&gt;but this would also require you to adapt the entries in /etc/fstab (unless it is automatically updated at reboot by some HAL daemon).&lt;BR /&gt;Sorry, for disgressing.&lt;BR /&gt;&lt;BR /&gt;After LV creation verify with&lt;BR /&gt;&lt;BR /&gt;# lvdisplay /dev/system/lv_secswap&lt;BR /&gt;&lt;BR /&gt;Then prepare it to be initialized as swap.&lt;BR /&gt;Be careful to not mix up with other volumes&lt;BR /&gt;because it renders any data on it useless!&lt;BR /&gt;&lt;BR /&gt;# mkswap /dev/system/lv_secswap&lt;BR /&gt;&lt;BR /&gt;Then add an entry for your new swap in fstab&lt;BR /&gt;(better use an editor like vi)&lt;BR /&gt;&lt;BR /&gt;# echo "/dev/system/lv_secswap  swap  swap  pri=10  0  0" &amp;gt;&amp;gt; /etc/fstab&lt;BR /&gt;&lt;BR /&gt;I deliberately chose (an optional) lower priority (bigger number) to make the system first use your better performing primary swap that must have been a "raw" disk partition like /dev/sda?&lt;BR /&gt;&lt;BR /&gt;Finally, activate the new swap device by&lt;BR /&gt;&lt;BR /&gt;# swapon -a&lt;BR /&gt;&lt;BR /&gt;And check it has been activated&lt;BR /&gt;&lt;BR /&gt;# swapon -s&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;# cat /proc/swaps&lt;BR /&gt;&lt;BR /&gt;That's it.&lt;BR /&gt;Now you should see 2 4 GB swap devices.&lt;BR /&gt;&lt;BR /&gt;Since you presumably have free space somewhere else (i.e. not captured in an LVM PV)&lt;BR /&gt;I would however advise you to use this instead for swap.&lt;BR /&gt;You already have RAID devices.&lt;BR /&gt;How about creating a new one?&lt;BR /&gt;&lt;BR /&gt;Check what you already got&lt;BR /&gt;&lt;BR /&gt;# mdadm -QDs&lt;BR /&gt;&lt;BR /&gt;or per device&lt;BR /&gt;&lt;BR /&gt;# mdadm -QD /dev/md0&lt;BR /&gt;&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;Also look at your disks if you have free space to create a further RAID partition.&lt;BR /&gt;&lt;BR /&gt;# fdisk -l /dev/sd[ab]&lt;BR /&gt;&lt;BR /&gt;The creation of swap is the same,&lt;BR /&gt;no matter if on an LVM volume, an MD RAID device, or a naked disk partition.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 19 Apr 2007 10:22:33 GMT</pubDate>
    <dc:creator>Ralph Grothe</dc:creator>
    <dc:date>2007-04-19T10:22:33Z</dc:date>
    <item>
      <title>Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984830#M27966</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;We are running a system with following detail,&lt;BR /&gt;&lt;BR /&gt;Linux bwga090 2.6.16.21-0.8-bigsmp #1 SMP Mon Jul 3 18:25:39 UTC 2006 i686 i686 i386 GNU/Linux&lt;BR /&gt;&lt;BR /&gt;The output of df -k is .&lt;BR /&gt;&lt;BR /&gt;bwga090:/var/log # df -k&lt;BR /&gt;Filesystem           1K-blocks      Used Available Use% Mounted on&lt;BR /&gt;/dev/sda3             20641788   5444456  14148692  28% /&lt;BR /&gt;udev                   2011504       140   2011364   1% /dev&lt;BR /&gt;/dev/sda1               202219      7278    184501   4% /boot&lt;BR /&gt;/dev/mapper/system-SYSTEM_OPT&lt;BR /&gt;                      25803068   8709232  15783116  36% /opt&lt;BR /&gt;/dev/mapper/system-SYSTEM_VAR&lt;BR /&gt;                      20642428  16323104   3270748  84% /var&lt;BR /&gt;/dev/md0              34977152  23225264   9975116  70% /var/home&lt;BR /&gt;/var/ftp/pub/suse/ix86&lt;BR /&gt;                      20642428  16323104   3270748  84% /srv/ftp&lt;BR /&gt;&lt;BR /&gt;I have attached the yast present partition scenario. can anyone help how to increase the swap space from 4GB to 8GB.&lt;BR /&gt; option 1) we can create partition in already existing LVM and add it to swap, but it will be end of disk which will result in reduced performance.&lt;BR /&gt;&lt;BR /&gt;Is there way to increase the present swap from 4GB to 8GB.&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Bhaski</description>
      <pubDate>Thu, 19 Apr 2007 08:32:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984830#M27966</guid>
      <dc:creator>bhaski</dc:creator>
      <dc:date>2007-04-19T08:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984831#M27967</link>
      <description>You can increase only if you have free space in the system volume group. Post the output of:&lt;BR /&gt;&lt;BR /&gt;vgdisplay -v system&lt;BR /&gt;&lt;BR /&gt;If you don't have free PPs, you must reduce the size of another file system in 4 G and then extend the swap logical volume.</description>
      <pubDate>Thu, 19 Apr 2007 08:52:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984831#M27967</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2007-04-19T08:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984832#M27968</link>
      <description>Hello Ivan,&lt;BR /&gt;&lt;BR /&gt;The output is as follows,&lt;BR /&gt;&lt;BR /&gt;bwga090:/var/log # vgdisplay -v system&lt;BR /&gt;    Using volume group(s) on command line&lt;BR /&gt;    Finding volume group "system"&lt;BR /&gt;  --- Volume group ---&lt;BR /&gt;  VG Name               system&lt;BR /&gt;  System ID             &lt;BR /&gt;  Format                lvm2&lt;BR /&gt;  Metadata Areas        1&lt;BR /&gt;  Metadata Sequence No  3&lt;BR /&gt;  VG Access             read/write&lt;BR /&gt;  VG Status             resizable&lt;BR /&gt;  MAX LV                0&lt;BR /&gt;  Cur LV                2&lt;BR /&gt;  Open LV               2&lt;BR /&gt;  Max PV                0&lt;BR /&gt;  Cur PV                1&lt;BR /&gt;  Act PV                1&lt;BR /&gt;  VG Size               112.52 GB&lt;BR /&gt;  PE Size               4.00 MB&lt;BR /&gt;  Total PE              28805&lt;BR /&gt;  Alloc PE / Size       11520 / 45.00 GB&lt;BR /&gt;  Free  PE / Size       17285 / 67.52 GB&lt;BR /&gt;  VG UUID               Y9ohUC-LKzO-WeHs-gueK-tARz-M8qI-Hd7WcX&lt;BR /&gt;   &lt;BR /&gt;  --- Logical volume ---&lt;BR /&gt;  LV Name                /dev/system/SYSTEM_OPT&lt;BR /&gt;  VG Name                system&lt;BR /&gt;  LV UUID                iQxxEJ-AdVy-6dvT-LUhJ-lJSH-Bk6z-ZNSZ27&lt;BR /&gt;  LV Write Access        read/write&lt;BR /&gt;  LV Status              available&lt;BR /&gt;  # open                 1&lt;BR /&gt;  LV Size                25.00 GB&lt;BR /&gt;  Current LE             6400&lt;BR /&gt;  Segments               1&lt;BR /&gt;  Allocation             inherit&lt;BR /&gt;  Read ahead sectors     0&lt;BR /&gt;  Block device           253:0&lt;BR /&gt;   &lt;BR /&gt;  --- Logical volume ---&lt;BR /&gt;  LV Name                /dev/system/SYSTEM_VAR&lt;BR /&gt;  VG Name                system&lt;BR /&gt;  LV UUID                Eq75jD-ra2t-yC9J-YrJs-ALrY-yKgn-t8LcLK&lt;BR /&gt;  LV Write Access        read/write&lt;BR /&gt;  LV Status              available&lt;BR /&gt;  # open                 1&lt;BR /&gt;  LV Size                20.00 GB&lt;BR /&gt;  Current LE             5120&lt;BR /&gt;  Segments               1&lt;BR /&gt;  Allocation             inherit&lt;BR /&gt;  Read ahead sectors     0&lt;BR /&gt;  Block device           253:1&lt;BR /&gt;   &lt;BR /&gt;  --- Physical volumes ---&lt;BR /&gt;  PV Name               /dev/sda4     &lt;BR /&gt;  PV UUID               rc0kZT-Vqr3-o4WW-HaiP-l1Oi-rZpJ-DxHWju&lt;BR /&gt;  PV Status             allocatable&lt;BR /&gt;  Total PE / Free PE    28805 / 17285&lt;BR /&gt;   &lt;BR /&gt;[1]+  Done                    yast2&lt;BR /&gt;bwga090:/var/log # &lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Bhaski</description>
      <pubDate>Thu, 19 Apr 2007 08:58:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984832#M27968</guid>
      <dc:creator>bhaski</dc:creator>
      <dc:date>2007-04-19T08:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984833#M27969</link>
      <description>Hi Bhaski,&lt;BR /&gt;&lt;BR /&gt;from the output of your vgdisplay -v system&lt;BR /&gt;one can see that you have plenty of unused PEs (over 67 GB).&lt;BR /&gt;So you could well create a new volume of 4 GB that you could use for swap.&lt;BR /&gt;However, unless the developers of the block device and LVM code haven't fixed this yet,&lt;BR /&gt;the general consensus has been that it performance wise was a bad idea to pu a swap device on an LVM volume.&lt;BR /&gt;But nevertheless it does work.&lt;BR /&gt;We have forcedly done this because unlike you we really ran short of unused disk space.&lt;BR /&gt;&lt;BR /&gt;So you could do this&lt;BR /&gt;&lt;BR /&gt;# lvcreate -L 4g -n lv_secswap system&lt;BR /&gt;&lt;BR /&gt;Btw, a bad name for a VG "system", or was that name chosen by the Yast installer?&lt;BR /&gt;They at least should have prepended something like "vg".&lt;BR /&gt;With Linux LVM you can change a VG's (and LV's) name a postiori (unlike with HP-UX LVM)&lt;BR /&gt;but this would also require you to adapt the entries in /etc/fstab (unless it is automatically updated at reboot by some HAL daemon).&lt;BR /&gt;Sorry, for disgressing.&lt;BR /&gt;&lt;BR /&gt;After LV creation verify with&lt;BR /&gt;&lt;BR /&gt;# lvdisplay /dev/system/lv_secswap&lt;BR /&gt;&lt;BR /&gt;Then prepare it to be initialized as swap.&lt;BR /&gt;Be careful to not mix up with other volumes&lt;BR /&gt;because it renders any data on it useless!&lt;BR /&gt;&lt;BR /&gt;# mkswap /dev/system/lv_secswap&lt;BR /&gt;&lt;BR /&gt;Then add an entry for your new swap in fstab&lt;BR /&gt;(better use an editor like vi)&lt;BR /&gt;&lt;BR /&gt;# echo "/dev/system/lv_secswap  swap  swap  pri=10  0  0" &amp;gt;&amp;gt; /etc/fstab&lt;BR /&gt;&lt;BR /&gt;I deliberately chose (an optional) lower priority (bigger number) to make the system first use your better performing primary swap that must have been a "raw" disk partition like /dev/sda?&lt;BR /&gt;&lt;BR /&gt;Finally, activate the new swap device by&lt;BR /&gt;&lt;BR /&gt;# swapon -a&lt;BR /&gt;&lt;BR /&gt;And check it has been activated&lt;BR /&gt;&lt;BR /&gt;# swapon -s&lt;BR /&gt;&lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;# cat /proc/swaps&lt;BR /&gt;&lt;BR /&gt;That's it.&lt;BR /&gt;Now you should see 2 4 GB swap devices.&lt;BR /&gt;&lt;BR /&gt;Since you presumably have free space somewhere else (i.e. not captured in an LVM PV)&lt;BR /&gt;I would however advise you to use this instead for swap.&lt;BR /&gt;You already have RAID devices.&lt;BR /&gt;How about creating a new one?&lt;BR /&gt;&lt;BR /&gt;Check what you already got&lt;BR /&gt;&lt;BR /&gt;# mdadm -QDs&lt;BR /&gt;&lt;BR /&gt;or per device&lt;BR /&gt;&lt;BR /&gt;# mdadm -QD /dev/md0&lt;BR /&gt;&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;Also look at your disks if you have free space to create a further RAID partition.&lt;BR /&gt;&lt;BR /&gt;# fdisk -l /dev/sd[ab]&lt;BR /&gt;&lt;BR /&gt;The creation of swap is the same,&lt;BR /&gt;no matter if on an LVM volume, an MD RAID device, or a naked disk partition.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 19 Apr 2007 10:22:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984833#M27969</guid>
      <dc:creator>Ralph Grothe</dc:creator>
      <dc:date>2007-04-19T10:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984834#M27970</link>
      <description>Something else to note is that when using multiple swap partitions (whether under LVM or not), the system will stipe across them to get better performance.&lt;BR /&gt;&lt;BR /&gt;But if everythings on a hardware RAID platform anyway, it's kinda moot.. ;P</description>
      <pubDate>Thu, 19 Apr 2007 17:42:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984834#M27970</guid>
      <dc:creator>Stuart Browne</dc:creator>
      <dc:date>2007-04-19T17:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: Increase in swap space.</title>
      <link>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984835#M27971</link>
      <description>Hi Ralph,&lt;BR /&gt;&lt;BR /&gt;Thank you very much, for your detailed list.&lt;BR /&gt;If there is no other way, i will plan to do this on next weekend as i fear getting inoperable during week day.&lt;BR /&gt;&lt;BR /&gt;And about the name of VG, it was done by former colleague,so dont know what stuck his mind to keep that name.&lt;BR /&gt;&lt;BR /&gt;There is absoutely no additional space apart from that in LVM or we need to add an external disk.&lt;BR /&gt;&lt;BR /&gt;I have following 3 doubts.&lt;BR /&gt;1) There is a discussion in group, that adding new logical volume in existing VG as SWAP will hinder performance and also it will be at end of disk. Is this true?&lt;BR /&gt;2) Can we decrease the size of VG(system) by 4GB and add that to SWAP???&lt;BR /&gt;3) this might sound stupid - can we decrease the size of /dev/sda3 ( / partition ) by 4GB and add it to swap? Is this possible?? if so recommendable??&lt;BR /&gt;&lt;BR /&gt;Thanks &amp;amp; Regards,&lt;BR /&gt;Bhaski</description>
      <pubDate>Fri, 20 Apr 2007 02:55:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/increase-in-swap-space/m-p/3984835#M27971</guid>
      <dc:creator>bhaski</dc:creator>
      <dc:date>2007-04-20T02:55:20Z</dc:date>
    </item>
  </channel>
</rss>

