{"id":224,"date":"2008-11-07T20:31:54","date_gmt":"2008-11-07T18:31:54","guid":{"rendered":"http:\/\/www.netexpertise.eu\/en\/?p=224"},"modified":"2021-07-18T21:29:01","modified_gmt":"2021-07-18T19:29:01","slug":"swap-file","status":"publish","type":"post","link":"http:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html","title":{"rendered":"Additional Swap in File on Linux\/Solaris"},"content":{"rendered":"\n<p>You need more swap but there&#8217;s no more disk space left to create a partition? Here&#8217;s a quick and easy fix creating a swap file on the existing filesystem. No reboot needed!<br><br><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Solaris<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@solaris]$ mkfile 1024m \/export\/tmpswap\n\n[root@solaris]$ swap -a \/export\/tmpswap\n\n[root@solaris]$ swap -l\nswapfile              dev       swaplo      blocks         free\n\/dev\/dsk\/c1t0d0s1&nbsp;    55,65     8           4160824        4160824\n\/export\/tmpswap       -         8           2097144        \u00a9<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><br>Linux<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">[root@linux]$ dd if=\/dev\/zero of=tmpswap bs=1024 count=10240\n10240+0 records in\n10240+0 records out\n10485760 bytes (10 MB) copied, 0.528435 seconds, 19.8 MB\/s\n\n[root@linux]$ mkswap tmpswap\nSetting up swapspace version 1, size = 10481 kB\n\n[root@linux]$ swapon tmpswap\n\n[root@linux]$ swapon -s\nFilename           Type            Size           Used         Priority\n\/dev\/hda2          partition       409648         0            -1\n\/tmp\/tmpswap&nbsp;      file            10232          0            -2<\/code><\/pre>\n\n\n\n<p><br>Do not use swap files on a personal computer that is configured to &#8220;suspend to disk&#8221; since it requires a dedicated partition to save the memory content while going to hibernation. This is not a problem on servers.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You need more swap but there&#8217;s no more disk space left to create a partition? Here&#8217;s a quick and easy fix creating a swap file on the existing filesystem. No reboot needed! Solaris Linux Do not use swap files on a personal computer that is configured to &#8220;suspend to disk&#8221; since it requires a dedicated [&hellip;]<\/p>\n","protected":false},"author":2,"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},"categories":[11,136],"tags":[386,393,153],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Netexpertise - Additional Swap in File on Linux\/Solaris<\/title>\n<meta name=\"description\" content=\"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Netexpertise - Additional Swap in File on Linux\/Solaris\" \/>\n<meta property=\"og:description\" content=\"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html\" \/>\n<meta property=\"og:site_name\" content=\"Netexpertise\" \/>\n<meta property=\"article:published_time\" content=\"2008-11-07T18:31:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-07-18T19:29:01+00:00\" \/>\n<meta name=\"author\" content=\"dave\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@netexpertise\" \/>\n<meta name=\"twitter:site\" content=\"@netexpertise\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html\",\"url\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html\",\"name\":\"Netexpertise - Additional Swap in File on Linux\/Solaris\",\"isPartOf\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\"},\"datePublished\":\"2008-11-07T18:31:54+00:00\",\"dateModified\":\"2021-07-18T19:29:01+00:00\",\"author\":{\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\"},\"description\":\"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem\",\"breadcrumb\":{\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/www.netexpertise.eu\/en\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Additional Swap in File on Linux\/Solaris\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#website\",\"url\":\"http:\/\/www.netexpertise.eu\/en\/\",\"name\":\"Netexpertise\",\"description\":\"Systems \/ Networks \/ DevOps\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa\",\"name\":\"dave\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"contentUrl\":\"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g\",\"caption\":\"dave\"},\"sameAs\":[\"http:\/\/www.netexpertise.eu\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Netexpertise - Additional Swap in File on Linux\/Solaris","description":"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html","og_locale":"en_US","og_type":"article","og_title":"Netexpertise - Additional Swap in File on Linux\/Solaris","og_description":"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem","og_url":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html","og_site_name":"Netexpertise","article_published_time":"2008-11-07T18:31:54+00:00","article_modified_time":"2021-07-18T19:29:01+00:00","author":"dave","twitter_card":"summary_large_image","twitter_creator":"@netexpertise","twitter_site":"@netexpertise","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html","url":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html","name":"Netexpertise - Additional Swap in File on Linux\/Solaris","isPartOf":{"@id":"http:\/\/www.netexpertise.eu\/en\/#website"},"datePublished":"2008-11-07T18:31:54+00:00","dateModified":"2021-07-18T19:29:01+00:00","author":{"@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa"},"description":"No space left on disk to add some extra swap on Linux or Solaris? Create a swap file on your server filesystem","breadcrumb":{"@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.netexpertise.eu\/en\/systems\/linux\/swap-file.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.netexpertise.eu\/en"},{"@type":"ListItem","position":2,"name":"Additional Swap in File on Linux\/Solaris"}]},{"@type":"WebSite","@id":"http:\/\/www.netexpertise.eu\/en\/#website","url":"http:\/\/www.netexpertise.eu\/en\/","name":"Netexpertise","description":"Systems \/ Networks \/ DevOps","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.netexpertise.eu\/en\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/cb4cd666549d22e9070ec1cfc1a496fa","name":"dave","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.netexpertise.eu\/en\/#\/schema\/person\/image\/","url":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","contentUrl":"http:\/\/1.gravatar.com\/avatar\/1129916e1f4955bd632f27f836f64e55?s=96&d=mm&r=g","caption":"dave"},"sameAs":["http:\/\/www.netexpertise.eu"]}]}},"_links":{"self":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/224"}],"collection":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":0,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.netexpertise.eu\/en\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}