{"id":365,"date":"2016-01-15T08:06:14","date_gmt":"2016-01-15T07:06:14","guid":{"rendered":"http:\/\/blog.daghosoft.com\/WP\/?p=365"},"modified":"2016-01-11T20:52:02","modified_gmt":"2016-01-11T19:52:02","slug":"add-more-swap-on-linux-vm-stored-on-local-fs","status":"publish","type":"post","link":"https:\/\/blog.daghosoft.com\/WP\/add-more-swap-on-linux-vm-stored-on-local-fs\/","title":{"rendered":"Add more Swap on linux Vm"},"content":{"rendered":"<p>How to add more swap on a linux Vm.<br \/>\nIt can be used on a physical machine too but remember that swap is store on a file and not in a dedicate partition.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n#########################sWap File\n#Create Local Folder\nmkdir -p \/usr\/local\/swap\/\n\n#Create a 2Gb Local File to store swap\ndd if=\/dev\/zero of=\/usr\/local\/swap\/swapfile1 bs=1024 count=2097152 #2gb 4194304\nmkswap \/usr\/local\/swap\/swapfile1\n\n#set Grant On File\ncd \/usr\/local\/swap\/\nchown root:root swapfile1\nchmod 0600 swapfile1\n\n#Enable Swap\nswapon swapfile1\n\n<\/pre>\n<p>Add this line in \/ect\/fstab to load swap on system startup:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n\/usr\/local\/swap\/swapfile1 swap swap defaults 0 0\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>How to add more swap on a linux Vm. It can be used on a physical machine too but remember that swap is store on a file and not in a dedicate partition. #########################sWap File #Create Local Folder mkdir -p \/usr\/local\/swap\/ #Create a 2Gb Local File to store swap dd if=\/dev\/zero of=\/usr\/local\/swap\/swapfile1 bs=1024 count=2097152 #2gb &hellip; <a href=\"https:\/\/blog.daghosoft.com\/WP\/add-more-swap-on-linux-vm-stored-on-local-fs\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Add more Swap on linux Vm<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[27,71,51],"class_list":["post-365","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-linux","tag-swap","tag-system-admin"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p77gJg-5T","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/posts\/365","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/comments?post=365"}],"version-history":[{"count":7,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/posts\/365\/revisions"}],"predecessor-version":[{"id":383,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/posts\/365\/revisions\/383"}],"wp:attachment":[{"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/media?parent=365"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/categories?post=365"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.daghosoft.com\/WP\/wp-json\/wp\/v2\/tags?post=365"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}