{"id":1192,"date":"2012-03-26T11:53:47","date_gmt":"2012-03-26T15:53:47","guid":{"rendered":"http:\/\/antipaucity.com\/?p=1192"},"modified":"2012-03-26T11:53:47","modified_gmt":"2012-03-26T15:53:47","slug":"symlinks-and-nfs","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=1192","title":{"rendered":"symlinks and nfs"},"content":{"rendered":"<p>I recently discovered an interesting &#8220;feature&#8221; of symbolic links in conjunction with NFS mounts: they don&#8217;t work!<\/p>\n<p>For example, let&#8217;s say you have the following NFS export:<\/p>\n<blockquote><p><code>\/media\/files<\/code><\/p><\/blockquote>\n<p>Inside of that export, you have the following path:<\/p>\n<blockquote><p><code>\/media\/files\/isos\/osmedia\/linux\/ubuntu<\/code><\/p><\/blockquote>\n<p>In *this* directory, you have a symlink called &#8216;<code>current<\/code>&#8216;, which points to a different location:<\/p>\n<blockquote><p><code>current -&gt; \/media\/osmedia\/linux\/ubuntu\/11.10<\/code><\/p><\/blockquote>\n<p>Here&#8217;s the rub: if anyone tries to mount the root (or sub path) of that NFS export (say <code>\/media\/files\/isos\/osmedia<\/code>) at a local point (say, <code>\/mnt\/osmedia<\/code>), the symlink will <em><strong>fail to work correctly<\/strong><\/em>\u00a0because there is no path <code>\/media\/osmedia\/linux\/ubuntu\/11.10<\/code> on the local machine!<\/p>\n<p>That&#8217;s not cool.<\/p>\n<p>Here is another case where <a href=\"http:\/\/antipaucity.com\/2012\/02\/27\/binding-your-mounts\">bind mounts<\/a> will save your bacon!<\/p>\n<p>Instead of using symlinks on the NFS host, use bind mounts &#8211; that way the path <em>will still work<\/em>\u00a0when exported.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I recently discovered an interesting &#8220;feature&#8221; of symbolic links in conjunction with NFS mounts: they don&#8217;t work! For example, let&#8217;s say you have the following NFS export: \/media\/files Inside of that export, you have the following path: \/media\/files\/isos\/osmedia\/linux\/ubuntu In *this* directory, you have a symlink called &#8216;current&#8216;, which points to a different location: current -&gt; &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=1192\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">symlinks and nfs<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[41],"tags":[450,514,740],"keyring_services":[],"class_list":["post-1192","post","type-post","status-publish","format-standard","hentry","category-technical","tag-linux","tag-nfs","tag-symlink"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1192"}],"version-history":[{"count":0,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/1192\/revisions"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1192"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}