{"id":78,"date":"2012-06-10T15:18:47","date_gmt":"2012-06-10T15:18:47","guid":{"rendered":"http:\/\/rmohan.com\/?p=78"},"modified":"2012-06-10T15:22:44","modified_gmt":"2012-06-10T15:22:44","slug":"extending-swap-on-an-lvm2-logical-volume","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=78","title":{"rendered":"Extending Swap on an LVM2 Logical Volume"},"content":{"rendered":"<p><strong>Extending Swap on an LVM2 Logical Volume <\/strong><\/p>\n<p>1)Check swap space and its utilization<br \/>\ncat \/proc\/swaps # free<\/p>\n<p>2) Scan (all disks) for Logical Volumes<br \/>\nlvscan<br \/>\n[root@localhost ~]# lvscan<br \/>\n  ACTIVE            &#8216;\/dev\/VolGroup\/lv_root&#8217; [47.44 GiB] inherit<br \/>\n  ACTIVE            &#8216;\/dev\/VolGroup\/lv_home&#8217; [46.19 GiB] inherit<br \/>\n  ACTIVE            &#8216;\/dev\/VolGroup\/lv_swap&#8217; [5.88 GiB] inherit<\/p>\n<p>3) Disable devices and files for paging and swapping<br \/>\nswapoff -v \/dev\/VolGroup\/lv_swap<\/p>\n<p>4)  Resize a logical volume Adding 1 GB<br \/>\nlvm lvresize \/dev\/VolGroup\/lv_swap -L +1G<\/p>\n<p>5) Set up a Linux swap area<br \/>\nmkswap \/dev\/VolGroup\/lv_swap<\/p>\n<p>6) Enable devices and files for paging and swapping<br \/>\nswapon -va<\/p>\n<p>7) Check swap space and its utilization<br \/>\ncat \/proc\/swaps # free<\/p>\n<p>8) Scan (all disks) for Logical Volumes<br \/>\nlvscan<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Extending Swap on an LVM2 Logical Volume <\/p>\n<p>1)Check swap space and its utilization cat \/proc\/swaps # free<\/p>\n<p>2) Scan (all disks) for Logical Volumes lvscan [root@localhost ~]# lvscan ACTIVE &#8216;\/dev\/VolGroup\/lv_root&#8217; [47.44 GiB] inherit ACTIVE &#8216;\/dev\/VolGroup\/lv_home&#8217; [46.19 GiB] inherit ACTIVE &#8216;\/dev\/VolGroup\/lv_swap&#8217; [5.88 GiB] inherit<\/p>\n<p>3) Disable devices and files for paging and swapping swapoff -v [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/78"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":4,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":81,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/81"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}