{"id":41,"date":"2013-07-23T13:20:03","date_gmt":"2013-07-23T16:20:03","guid":{"rendered":"http:\/\/vargolino.com\/wp\/?p=41"},"modified":"2013-07-24T14:22:41","modified_gmt":"2013-07-24T17:22:41","slug":"resizing-a-tmpfs-partition-without-losing-the-files","status":"publish","type":"post","link":"https:\/\/vargolino.com\/wp\/?p=41","title":{"rendered":"Resizing a tmpfs partition without losing the files"},"content":{"rendered":"<p>Took me just a few seconds of Googleing, but it seems worth taking a note here.<\/p>\n<p>To resize a tmpfs filesystem without losing the files. Assuming that \/tmp is being mounted in a tmpfs.<\/p>\n<p>You can do it so it lasts until next reboot with:<\/p>\n<pre>mount \/tmp -o size=3000M,remount<\/pre>\n<p>Or you can do it so it lasts forever\u00a0:<\/p>\n<ol>\n<li>Modify \/etc\/fstab line to look something like this:\n<pre>none \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/tmp \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0tmpfs \u00a0 size=3g \u00a0 \u00a0 \u00a0 \u00a00 0<\/pre>\n<\/li>\n<li>Remount the filesystem\n<pre>\r\n# mount -o remount \/tmp\r\n<\/pre>\n<\/li>\n<li>Check if it all went OK\n<pre>\r\n# df -h\r\n<\/pre>\n<\/li>\n<\/ol>\n<p>Note: Increasing too much can cause the system to hang if the amount cannot be allocated.<\/p>\n<p>References (hope at leat one of these links still work):<\/p>\n<p><a href=\"http:\/\/lxr.linux.no\/linux\/Documentation\/filesystems\/tmpfs.txt\" rel=\"nofollow\">http:\/\/lxr.linux.no\/linux\/Documentation\/filesystems\/tmpfs.txt<\/a><br \/>\n<a href=\"http:\/\/www.xenotime.net\/linux\/doc\/swap-mini-howto.txt\" rel=\"nofollow\">http:\/\/www.xenotime.net\/linux\/doc\/swap-mini-howto.txt<\/a><br \/>\n<a title=\"here\" href=\"http:\/\/wiki.linuxquestions.org\/wiki\/Tmpfs#ixzz13amAsYk1\" target=\"_blank\">http:\/\/wiki.linuxquestions.org\/wiki\/Tmpfs#ixzz13amAsYk1<\/a><br \/>\n<a href=\"http:\/\/ihazem.wordpress.com\/2011\/03\/08\/increase-size-of-tmpfs-file-system\/\">http:\/\/ihazem.wordpress.com\/2011\/03\/08\/increase-size-of-tmpfs-file-system\/<\/a><br \/>\n<a href=\"http:\/\/www.biosplus.com\/2012\/02\/increasing-size-tmpfs-losing-files\/\">http:\/\/www.biosplus.com\/2012\/02\/increasing-size-tmpfs-losing-files\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Took me just a few seconds of Googleing, but it seems worth taking a note here. To resize a tmpfs filesystem without losing the files. Assuming that \/tmp is being mounted in a tmpfs. You can do it so it lasts until next reboot with: mount \/tmp -o size=3000M,remount Or you can do it so &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/vargolino.com\/wp\/?p=41\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Resizing a tmpfs partition without losing the files&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[7,9,8],"class_list":["post-41","post","type-post","status-publish","format-standard","hentry","category-solution","tag-howto","tag-linux","tag-tmpfs","entry"],"_links":{"self":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=41"}],"version-history":[{"count":7,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41\/revisions"}],"predecessor-version":[{"id":58,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=\/wp\/v2\/posts\/41\/revisions\/58"}],"wp:attachment":[{"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=41"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vargolino.com\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}