{"id":6255,"date":"2023-06-11T09:24:10","date_gmt":"2023-06-11T09:24:10","guid":{"rendered":"https:\/\/really.zonky.org\/?p=6255"},"modified":"2023-06-11T09:24:14","modified_gmt":"2023-06-11T09:24:14","slug":"do-you-need-a-separate-home-partition-for-linux","status":"publish","type":"post","link":"https:\/\/really.zonky.org\/?p=6255","title":{"rendered":"Do You Need A Separate \/home Partition for Linux?"},"content":{"rendered":"\n<p>Ah yes! The eternal debate on how to do storage under Linux (and previously Unix). This debate has been going on since Unix found itself with some disks.<\/p>\n\n\n\n<p>No, but &#8230; <\/p>\n\n\n\n<p>First of all, in the simplest case of installing Linux onto a machine with a single disk isn&#8217;t the <em>only<\/em> possibility here. If you are in that situation, you do need to consider a separate partition for the <em>\/home<\/em> file system.<\/p>\n\n\n\n<p>But there are all sorts of other possibilities here &#8211; for example my own workstation has a separate <em>\/home<\/em> file system but it comes from another (ZFS) storage pool of disks. So my system disk doesn&#8217;t have a separate partition for <em>\/home<\/em>. If you are using extra disks you&#8217;ll almost always want a separate <em>\/home<\/em> file system.<\/p>\n\n\n\n<p>But before we get too deep into the technical terms, what exactly are they? <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>When setting up a new disk, you can divide it up into 1 or more <em>partitions<\/em> which to the operating system look pretty much like disks &#8211; you can use <em>nvme0n1<\/em> to create a file system, or you can use <em>nvme0n1p1<\/em>. On a system disk you will very often have three or more &#8211; one each for <em>\/boot<\/em>, <em>\/boot\/efi<\/em>, and <em>\/<\/em> (at the least). <\/li>\n\n\n\n<li>Once Linux has taken over a disk and &#8220;formatted&#8221; it for its use, it has a data structure on it that makes it a <em>file system<\/em> of one type or another. This file system can be <em>mounted<\/em> at any point in the hierarchy, so historically (when we had much smaller disks), there could be file systems mounted at \/, \/usr, \/var, \/var\/spool, \/usr\/local, etc.<\/li>\n<\/ol>\n\n\n\n<p>So do we <em>need<\/em> a separate <em>\/home<\/em> file system? Of course not, but that doesn&#8217;t mean it isn&#8217;t a wise thing to do. <\/p>\n\n\n\n<p>If you&#8217;re setting up a throw-away laptop that won&#8217;t ever store anything important, then sure a separate <em>\/home<\/em> file system is probably a waste of time &#8211; it&#8217;ll probably only ever store some configuration files. If the system you&#8217;re setting up is your main machine and <em>\/home<\/em> contains all your files &#8211; past, present, and future, then a separate <em>\/home<\/em> file system is worth considering.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>If you ever re-install the operating system, your separate <em>\/home<\/em> could be preserved so that you don&#8217;t have to restore from backup. That isn&#8217;t <em>safe<\/em> (so you should always have a backup elsewhere) but it can be done fairly easily (with enough practice).<\/li>\n\n\n\n<li>If you upgrade your storage, a separate <em>\/home<\/em> file system can be quicker and safer to copy (at the file system level) to the new storage. Doing it on a file-by-file basis (such as with the excellent <em>rsync<\/em>) is likely to be <em>very<\/em> much slower than doing it at the file system level (such as with <em>zfs send<\/em>).<\/li>\n\n\n\n<li>It should be a great deal easier to take <em>important<\/em> backups if all the important files are on one file system. <\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"521\" src=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?resize=695%2C521&#038;ssl=1\" alt=\"\" class=\"wp-image-6152\" srcset=\"https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?resize=1024%2C768&amp;ssl=1 1024w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?resize=300%2C225&amp;ssl=1 300w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?resize=768%2C576&amp;ssl=1 768w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?resize=1536%2C1152&amp;ssl=1 1536w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?w=1654&amp;ssl=1 1654w, https:\/\/i0.wp.com\/really.zonky.org\/wp-content\/uploads\/2022-03-28-peering-at-each-other.jpeg?w=1390&amp;ssl=1 1390w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><figcaption class=\"wp-element-caption\">Peering At Each Other<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Ah yes! The eternal debate on how to do storage under Linux (and previously Unix). This debate has been going on since Unix found itself with some disks. No, but &#8230; First of all, in the simplest case of installing Linux onto a machine with a single disk isn&#8217;t the only possibility here. If you <a href='https:\/\/really.zonky.org\/?p=6255' class='excerpt-more'>[&#8230;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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},"_share_on_mastodon":"1"},"categories":[4,209],"tags":[2143,2142,43,2141],"class_list":["post-6255","post","type-post","status-publish","format-standard","hentry","category-it","category-linux-it","tag-home-2","tag-file-system","tag-linux","tag-partition","category-4-id","category-209-id","post-seq-1","post-parity-odd","meta-position-corners","fix"],"share_on_mastodon":{"url":"https:\/\/mstdn.social\/@grumpygrimnir\/110524855586915572","error":""},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1f2KI-1CT","_links":{"self":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6255","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6255"}],"version-history":[{"count":1,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6255\/revisions"}],"predecessor-version":[{"id":6256,"href":"https:\/\/really.zonky.org\/index.php?rest_route=\/wp\/v2\/posts\/6255\/revisions\/6256"}],"wp:attachment":[{"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/really.zonky.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}