{"id":52,"date":"2024-03-12T21:41:07","date_gmt":"2024-03-13T03:41:07","guid":{"rendered":"http:\/\/192.168.7.23\/?p=52"},"modified":"2024-05-26T17:45:11","modified_gmt":"2024-05-26T23:45:11","slug":"nfs-connecting-a-pi-to-a-synology-nas","status":"publish","type":"post","link":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/","title":{"rendered":"NFS: Connecting a Raspberry Pi to a Synology NAS"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">Introduction<\/h4>\n\n\n\n<p><a href=\"http:\/\/192.168.7.21:8000\/index.php\/2024\/03\/24\/raspberry-pi-realtime-backups\/\">I&#8217;m setting up backups for my all of my pies<\/a> .&nbsp; To store the backups, I&#8217;m connecting the pi, pis, pies to my NAS using the NFS protocol.&nbsp; <a href=\"http:\/\/192.168.7.21:8000\/index.php\/2024\/03\/15\/using-sshfs-and-synology\/\">I couldn&#8217;t get sshsf to work with my Synology NAS.<\/a> It was such a pain I gave up.<\/p>\n\n\n\n<p>Backups up to the NAS let&#8217;s me keep my backups in one, redundant location.&nbsp; The backups are made using a back up tool that makes backups of pies while they are still running, <a href=\"http:\/\/192.168.7.21:8000\/index.php\/2024\/03\/24\/raspberry-pi-realtime-backups\/\" target=\"_blank\" rel=\"noreferrer noopener\">Raspberry Pi, Realtime Backups<\/a>. This way my FreePBX VoIP system and this WordPress site, etc. will survive when their SDs don&#8217;t.<\/p>\n\n\n\n<p>Between setting up the NAS to receive the backups via NFS, remembering how to do a mount command and finding a line where someone figured out fstab for me, it took me about 40 minutes.&nbsp; Probably the shortest trip of this journey.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Procedure<\/h3>\n\n\n\n<p><em>Note: don&#8217;t forget to open the firewall ports for NFS (I always forget to open the ports and then troubleshoot for hours)<\/em><\/p>\n\n\n\n<p><em>Port 111 (TCP &amp; UDP) and 2049 (TCP &amp;&nbsp; UDP) 892 (TCP &amp; UDP).<\/em><\/p>\n\n\n\n<p>What I did: (details on how to do each item are in the links, they wrote it better than I can)<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>I went into the Synology NAS and turned on NFS for the specific share, locking it down to the IP of each Pi.<\/li>\n\n\n\n<li>On the NAS I setup a folder to connect to.<\/li>\n\n\n\n<li>On the NAS I created a user with the same name as my user on the pies and gave it permissions read and write to the folder.<\/li>\n\n\n\n<li>On each of the pies &#8211; I setup a directory under \/mnt.&nbsp; I called it pibak \/mnt\/backups. use the mounting point and folder name you like.<\/li>\n\n\n\n<li>For each of the pies I mkdir a new directory.&nbsp; Then tested for permissions and made sure it all looked ok.<\/li>\n\n\n\n<li>I setup Fstab, ran the umount -a command until I changed the syntax to fix all the errors, rebooted and tested the mount to make sure the directory mounted correctly.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Commands<\/h3>\n\n\n\n<p>Here is the mount command that worked for me, after I made the directory pibak:<br>sudo mount -t nfs 192.168.1.28:\/volume1\/backups \/mnt\/backups<\/p>\n\n\n\n<p>Here is the ftsab line that worked for me once I could get the directory mounted:<br>192.168.1.28\/volume1\/pibak \/mnt\/pibak nfs auto,rw,bg,hard,intr 0 0<\/p>\n\n\n\n<p>fstab is located at \/etc\/fstab<\/p>\n\n\n\n<p>Test fstab by unmounting and then doing a mount -a.  No errors means you are good to go and will survive a reboot.  Now reboot and test.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Resources<\/h3>\n\n\n\n<p><strong>Setting up the Synology:<\/strong><br><a href=\"https:\/\/kb.synology.com\/en-br\/DSM\/tutorial\/How_to_access_files_on_Synology_NAS_within_the_local_network_NFS\">How to access files on Synology NAS within the local network (NFS)<\/a><\/p>\n\n\n\n<p><strong>Assigning permissions:<\/strong><br><a href=\"https:\/\/kb.synology.com\/en-br\/DSM\/help\/DSM\/AdminCenter\/file_share_privilege_nfs?version=7\" target=\"_blank\" rel=\"noreferrer noopener\">Assign NFS Permissions<\/a><\/p>\n\n\n\n<p><strong>Getting the pi connected &amp; mounted:<\/strong><br><a href=\"https:\/\/www.gavingreer.com\/2020\/03\/06\/synology-nfs-mount\">Synology Settings for NFS<\/a><\/p>\n\n\n\n<p><strong>Dealing with access denied even though they mounted (not all had this issue):<\/strong><br><a href=\"https:\/\/forums.raspberrypi.com\/viewtopic.php?t=356982\" target=\"_blank\" rel=\"noreferrer noopener\"> [SOLVED] Connecting to Synology NAS with NFS &#8211; Permission Denied?<\/a><\/p>\n\n\n\n<p><strong>Verifying the fstab without a reboot &#8211;<\/strong><a href=\"https:\/\/sleeplessbeastie.eu\/2019\/01\/21\/how-to-verify-fstab-file\/\">How to verify fstab file<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Bonus<\/h3>\n\n\n\n<p>Other sources I&#8217;ve used in the past to setup a pi NFS server and hook to it to another pi running as a mini nas server with ssd<\/p>\n\n\n\n<p><strong>setup a NFS server<\/strong><br><a href=\"https:\/\/pimylifeup.com\/raspberry-pi-nfs\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Setup Raspberry Pi NFS Server<\/a><\/p>\n\n\n\n<p><strong>connect client to the NFS server &#8211;<\/strong><br><a href=\"https:\/\/pimylifeup.com\/raspberry-pi-nfs-client\/\" target=\"_blank\" rel=\"noreferrer noopener\">Connecting to an NFS Share on the Raspberry Pi<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction I&#8217;m setting up backups for my all of my pies .&nbsp; To store the backups, I&#8217;m connecting the pi, pis, pies to my NAS using the NFS protocol.&nbsp; I couldn&#8217;t get sshsf to work with my Synology NAS. It was such a pain I gave up. Backups up to the NAS let&#8217;s me keep&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-raspberry-pi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.8.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701<\/title>\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.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701\" \/>\n<meta property=\"og:description\" content=\"Introduction I&#8217;m setting up backups for my all of my pies .&nbsp; To store the backups, I&#8217;m connecting the pi, pis, pies to my NAS using the NFS protocol.&nbsp; I couldn&#8217;t get sshsf to work with my Synology NAS. It was such a pain I gave up. Backups up to the NAS let&#8217;s me keep...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\" \/>\n<meta property=\"og:site_name\" content=\"Redshirt1701\" \/>\n<meta property=\"article:published_time\" content=\"2024-03-13T03:41:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-26T23:45:11+00:00\" \/>\n<meta name=\"author\" content=\"Dylan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dpedersen\" \/>\n<meta name=\"twitter:site\" content=\"@dpedersen\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Dylan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\"},\"author\":{\"name\":\"Dylan\",\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e\"},\"headline\":\"NFS: Connecting a Raspberry Pi to a Synology NAS\",\"datePublished\":\"2024-03-13T03:41:07+00:00\",\"dateModified\":\"2024-05-26T23:45:11+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\"},\"wordCount\":563,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e\"},\"articleSection\":[\"Raspberry Pi\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\",\"url\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\",\"name\":\"NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701\",\"isPartOf\":{\"@id\":\"https:\/\/www.redshirt1701.com\/#website\"},\"datePublished\":\"2024-03-13T03:41:07+00:00\",\"dateModified\":\"2024-05-26T23:45:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.redshirt1701.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NFS: Connecting a Raspberry Pi to a Synology NAS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.redshirt1701.com\/#website\",\"url\":\"https:\/\/www.redshirt1701.com\/\",\"name\":\"Redshirt1701 - What's On My Mind\",\"description\":\"Supplemental guides for the Raspberry Pi  to fill in the gaps in regular tutorials and other stuff\",\"publisher\":{\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.redshirt1701.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e\",\"name\":\"Dylan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/192.168.7.21:8000\/wp-content\/uploads\/2024\/05\/image.png\",\"contentUrl\":\"http:\/\/192.168.7.21:8000\/wp-content\/uploads\/2024\/05\/image.png\",\"width\":1071,\"height\":1051,\"caption\":\"Dylan\"},\"logo\":{\"@id\":\"https:\/\/www.redshirt1701.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/192.168.7.21:8000\",\"https:\/\/x.com\/dpedersen\"],\"url\":\"https:\/\/www.redshirt1701.com\/index.php\/author\/redshirtdkp\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701","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.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/","og_locale":"en_US","og_type":"article","og_title":"NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701","og_description":"Introduction I&#8217;m setting up backups for my all of my pies .&nbsp; To store the backups, I&#8217;m connecting the pi, pis, pies to my NAS using the NFS protocol.&nbsp; I couldn&#8217;t get sshsf to work with my Synology NAS. It was such a pain I gave up. Backups up to the NAS let&#8217;s me keep...","og_url":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/","og_site_name":"Redshirt1701","article_published_time":"2024-03-13T03:41:07+00:00","article_modified_time":"2024-05-26T23:45:11+00:00","author":"Dylan","twitter_card":"summary_large_image","twitter_creator":"@dpedersen","twitter_site":"@dpedersen","twitter_misc":{"Written by":"Dylan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#article","isPartOf":{"@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/"},"author":{"name":"Dylan","@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e"},"headline":"NFS: Connecting a Raspberry Pi to a Synology NAS","datePublished":"2024-03-13T03:41:07+00:00","dateModified":"2024-05-26T23:45:11+00:00","mainEntityOfPage":{"@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/"},"wordCount":563,"commentCount":0,"publisher":{"@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e"},"articleSection":["Raspberry Pi"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/","url":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/","name":"NFS: Connecting a Raspberry Pi to a Synology NAS - Redshirt1701","isPartOf":{"@id":"https:\/\/www.redshirt1701.com\/#website"},"datePublished":"2024-03-13T03:41:07+00:00","dateModified":"2024-05-26T23:45:11+00:00","breadcrumb":{"@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.redshirt1701.com\/index.php\/2024\/03\/12\/nfs-connecting-a-pi-to-a-synology-nas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.redshirt1701.com\/"},{"@type":"ListItem","position":2,"name":"NFS: Connecting a Raspberry Pi to a Synology NAS"}]},{"@type":"WebSite","@id":"https:\/\/www.redshirt1701.com\/#website","url":"https:\/\/www.redshirt1701.com\/","name":"Redshirt1701 - What's On My Mind","description":"Supplemental guides for the Raspberry Pi  to fill in the gaps in regular tutorials and other stuff","publisher":{"@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.redshirt1701.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/178b5651c1b98c2201e455772be8947e","name":"Dylan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/image\/","url":"http:\/\/192.168.7.21:8000\/wp-content\/uploads\/2024\/05\/image.png","contentUrl":"http:\/\/192.168.7.21:8000\/wp-content\/uploads\/2024\/05\/image.png","width":1071,"height":1051,"caption":"Dylan"},"logo":{"@id":"https:\/\/www.redshirt1701.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/192.168.7.21:8000","https:\/\/x.com\/dpedersen"],"url":"https:\/\/www.redshirt1701.com\/index.php\/author\/redshirtdkp\/"}]}},"_links":{"self":[{"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/comments?post=52"}],"version-history":[{"count":9,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":220,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/posts\/52\/revisions\/220"}],"wp:attachment":[{"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/media?parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/categories?post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.redshirt1701.com\/index.php\/wp-json\/wp\/v2\/tags?post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}