{"id":4714,"date":"2025-09-16T15:44:12","date_gmt":"2025-09-16T22:44:12","guid":{"rendered":"https:\/\/blog.dabbleden.com\/?p=4714"},"modified":"2025-09-16T16:25:37","modified_gmt":"2025-09-16T23:25:37","slug":"turning-my-home-server-into-a-nas","status":"publish","type":"post","link":"https:\/\/blog.dabbleden.com\/index.php\/2025\/09\/16\/turning-my-home-server-into-a-nas\/","title":{"rendered":"Turning My Home Server Into A NAS with MergerFS and SnapRAID"},"content":{"rendered":"\n<p>I finally got around to building a NAS out of my home server. <\/p>\n\n\n\n<p>I used MergerFS and SnapRAID to turn my ProxMox node into a single mountable network drive that had redundancy, while being able to swipe a drive and throw it into another PC and still read that data without overhead or formatting. And STILL use that PC for virtualization.<\/p>\n\n\n\n<p>This is the best setup I&#8217;ve found in years, and I finally got around to setting it up!<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">The Journey (skip to next heading if you don&#8217;t care)<\/h1>\n\n\n\n<p>The journey went on a bit of a tangent from my original goal, as my focus was purely on data hoarding. But spinning up VMs, running containers, and experimenting with various corners of the open-source world to help organize my chaotic brain and life sort of took over. But as my homelab grew, I realized something: I was sitting on a lot of unused local storage still. Why have I still not turned one of my Proxmox nodes into a NAS and centralize my files, backups, and media?<\/p>\n\n\n\n<p>It all started when I lost my one-and-only hard drive on my one-and-only computer, losing photos, notes, and more from over the years. I turned that into a multi-drive setup (over a decade or more ago now) where I had the main OS on a small SSD and the data on a HDD, with an external drive as backup. The fear of losing that external drive due to weather, handling, and more just got me thinking of redundancy more and more.<\/p>\n\n\n\n<p>This turned into multiple drives, like, as many as I could find. I went to Goodwill, ebay, extracting hard drives from those WD external nas things&#8230; Well, I didn&#8217;t know that most multi-drive setups like RAID require same\/similar drives. And I had windows. One of those PCs I got from Goodwill turned into a second computer I had to turn into a NAS with all those drives, but I only had windows. Hadn&#8217;t even heard about linux before.<\/p>\n\n\n\n<p>So, with Windows, I found StableBit DrivePool. And you know what, that was still probably one of the better setups. It didn&#8217;t care about what drives you had, you could hot-swap them for all it cared, and it duplicated the files, not bits, and I could use ALL of the drives for all they offered. It just, worked. Turned all those drives into one mount point for my other computers.<\/p>\n\n\n\n<p>Problem: It was Windows. bleh. I was using so much power, so much heat, and for it to JUST be a storage box that I would have to remote into to manage or run anything. I still hadn&#8217;t learned about virtualization yet. And oh man, when I learned about ProxMox and being able to VIRTUALIZE the windows server and then also use pihole and whatever the heck else? Well, that was a no-brainer.<\/p>\n\n\n\n<p>The &#8220;actual&#8221; problem: StableBit DrivePool wasn&#8217;t on linux.<\/p>\n\n\n\n<p>So&#8230; It sat. <\/p>\n\n\n\n<p>I got a Synology NAS to hold my data instead, thinking &#8220;throw money at it, the problem will go away&#8221;. &#8220;Get a proper setup&#8221;. And &#8220;Everyone else has one&#8221; were all thoughts I had, thinking I finally did it right. And, sure, not a huge loss on that. A buddy had a spare synology with no drives so I took a couple and threw it in there. Good lord that was slow. And only mirrored. and locked into synology OS, which was not my favorite but not bad, coming from not even knowing what a NAS actually was.<\/p>\n\n\n\n<p>That enabled me to use my was-nas into now a proxmox host!<\/p>\n\n\n\n<p>What started as a weekend experiment has now become one of the most useful parts of my setup. As not only could I host verious apps, I finally, after about a decade of putting it off, turned that sucker into a LINUX StableBit Drivepool-esque NAS. (It&#8217;s not DrivePool, but we&#8217;ll get to that.) I ran it directly from the ProxMox host itself, and it&#8217;s solved all of my issues (other than off-premise backups&#8230;)<\/p>\n\n\n\n<p>Here\u2019s the story of how I did it, what I learned along the way, and a generic guide so you can try it yourself.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">Why Use Proxmox as a NAS?<\/h1>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Consolidation \u2013 One box can handle both virtualization and storage duties.<\/li>\n\n\n\n<li>Flexibility \u2013 You can <span style=\"text-decoration: underline;\">choose<\/span> your filesystem, RAID\/ZFS-like setup, and sharing protocol. Hotswap into any other proxmox\/linux box and still read the drives\n<ul class=\"wp-block-list\">\n<li>I can use ANY mix of drives, unlike stupid RAID pools. <\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>Expandability &#8211; Add the drive to the mount and off you go!<\/li>\n\n\n\n<li>Integration \u2013 Backups from other Proxmox nodes can land directly on the NAS node. <\/li>\n\n\n\n<li>Cost\u2011effective \u2013 No need for a separate dedicated NAS appliance. But, mount it into a VM and you can use a NAS OS if you choose.<\/li>\n<\/ul>\n\n\n\n<p>Essentially, I had a HDD die. So, that means any hardware can fail at any time, right? My new gaming PC shipped with a bad 13th gen intel chip, so the whole computer was useless until that got replaced. I&#8217;ve had bad RAM. I&#8217;ve had a bad Power Supply. I&#8217;ve actually seen most issues at this point lead me believe my drives have actually been the longest living hardware I&#8217;ve had, ironically. So, I wanted to hot-swap them into any other PC and read the data, without the need of all drives and RAID being set up and formatting my drives.<\/p>\n\n\n\n<p>ProxMox is free, and under the hood it&#8217;s just debian with some extra flavor on top. So, it doesn&#8217;t even really need to be ProxMox, but any linux flavor.<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">MergerFS + SnapRAID = Happy me!<\/h1>\n\n\n\n<p>MergerFS takes all the drives and &#8216;merges&#8217; them into one mount point. SnapRAID takes those drives and balances the data and duplicating it to another drive. So no drive has all the data. As I was saying earlier, my drives have actually been the longest lasting hardware for me, so I&#8217;m not expecting to lose more than a drive at a time. Until a tornado strikes I guess&#8230; Bigger problems at that point.<\/p>\n\n\n\n<p>So my StableBit Drivepool experience can now be on linux. And free!!! <\/p>\n\n\n\n<p>Now&#8230; I just had to learn how to do that. I just heard these words on Google and had no idea what any of that actually looked like in practice. So, I&#8217;m glad I had my Synology to store my stuff while I played with my setup because I would have lost some data in this process&#8230;<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">How-To!<\/h1>\n\n\n\n<p>(commands are assuming you&#8217;re running this on your proxmox node as root, sudo will be omitted. You may need sudo)<\/p>\n\n\n\n<p>This ProxMox server is one of many in a cluster. I went a little nuts with mini-pcs and 10-inch racks, as you&#8217;ll see in my other posts. So my intentions made my experience a little tricky trying to get both NFS and SMB shares working with the right permissions. It&#8217;s otherwise rather straightforward.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How to Turn a Proxmox Node into a NAS<br>Note: These steps are intentionally generic \u2014 adapt them to your environment, IP scheme, and security requirements.<\/h2>\n\n\n\n<p>Install MergerFS and SnapRAID (this is the easy part)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt install mergerfs snapraid -y<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Prepare the Storage Disks<\/h2>\n\n\n\n<p>Install and connect your drives to the Proxmox node.<\/p>\n\n\n\n<p>List all the disks to be able to see the drive letter that linux provided:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>lsblk -o NAME,SIZE,MOUNTPOINT,LABEL<\/code><\/pre>\n\n\n\n<p>If you have multiple drives of similar size, it&#8217;s sort of hard to tell exactly which disk is which, physically, as that may come in handy when a drive dies you can just walk up to the server and swap it out. You can get more detail with this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>blkid<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2 &#8211; Format and Label the Disks, and Mount<\/h2>\n\n\n\n<p>There needs to be a parity disk, which has to be larger than your largest storage disk. They can be named in any order.<\/p>\n\n\n\n<p>&#8216;parted&#8217; makes the partitions using ext4 and clears it to 100% usable space. <\/p>\n\n\n\n<p>sde is the example drive: you may need sda, or sdc, or more. Do this for each drive you want in the pool, changing the &#8220;sdX&#8221; for your drive.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>parted \/dev\/sde --script mklabel gpt\nparted \/dev\/sde --script mkpart primary ext4 0% 100%<\/code><\/pre>\n\n\n\n<p>Do that for each disk.<\/p>\n\n\n\n<p>Next, label one \u201cparity\u201d drive, and \u201cdiskX\u201d after the drives have been formatted. <\/p>\n\n\n\n<p>For example, 8 drives could look like this, order doesn&#8217;t matter, but could for you:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkfs.ext4 -L disk3 \/dev\/sda1<br>mkfs.ext4 -L disk2 \/dev\/sdb1<br>mkfs.ext4 -L disk5 \/dev\/sdc1<br>mkfs.ext4 -L disk7 \/dev\/sdd1<br>mkfs.ext4 -L parity \/dev\/sde1<br>mkfs.ext4 -L disk8 \/dev\/sdf1<br>mkfs.ext4 -L disk4 \/dev\/sdg1<br>mkfs.ext4 -L disk6 \/dev\/sdh1<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3 &#8211; Create Mount Points<\/h2>\n\n\n\n<p>I omitted disk1 because it made sense to me, disk1 is my parity drive. But you might do disk1 and have the last drive be parity, which might make more sense to you. It&#8217;s personal preference.<\/p>\n\n\n\n<p>Make the directories for each mount point:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir -p \/mnt\/parity \n# mkdir -p \/mnt\/disk1 \nmkdir -p \/mnt\/disk2 \/mnt\/disk3 \/mnt\/disk4 \/mnt\/disk5 \/mnt\/disk6 \/mnt\/disk7 \/mnt\/disk8 <\/code><\/pre>\n\n\n\n<p>Then mount those drives!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mount \/dev\/disk\/by-label\/disk1 \/mnt\/disk1\nmount \/dev\/disk\/by-label\/parity \/mnt\/parity\nmount \/dev\/disk\/by-label\/disk2 \/mnt\/disk2\nmount \/dev\/disk\/by-label\/disk3 \/mnt\/disk3\nmount \/dev\/disk\/by-label\/disk4 \/mnt\/disk4\nmount \/dev\/disk\/by-label\/disk5 \/mnt\/disk5\nmount \/dev\/disk\/by-label\/disk6 \/mnt\/disk6\nmount \/dev\/disk\/by-label\/disk7 \/mnt\/disk7\nmount \/dev\/disk\/by-label\/disk8 \/mnt\/disk8<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Create MergerFS pool<\/h2>\n\n\n\n<p>Make the path you&#8217;d like to share. I&#8217;ll refer to mine as &#8220;store&#8221;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/mnt\/store<\/code><\/pre>\n\n\n\n<p>and merge teh disks you mounted earlier into the pool<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mergerfs \/mnt\/disk2:\/mnt\/disk3:\/mnt\/disk4:\/mnt\/disk5:\/mnt\/disk6:\/mnt\/disk7:\/mnt\/disk8 \/mnt\/store \\\n  -o defaults,allow_other,use_ino,category.create=epmfs<\/code><\/pre>\n\n\n\n<p>I ran into an error when trying to use an array for the drive numbers so it&#8217;s here as an options, but I recommend you do it individually instead, just ensure the disk labels match and DO NOT include the parity drive. <\/p>\n\n\n\n<pre class=\"wp-block-code has-background\" style=\"background-color:#30231e\"><code>mergerfs \/mnt\/disk{2..8} \/mnt\/store \\\n  -o defaults,allow_other,use_ino,category.create=epmfs<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4.5 &#8211; Make that persistent using fstab<\/h2>\n\n\n\n<p>edit your fstab configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/fstab<\/code><\/pre>\n\n\n\n<p>and under the commented area, place in this block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Persistent mounts for data drives\nLABEL=disk2    \/mnt\/disk2    ext4    defaults,nofail    0    2\nLABEL=disk3    \/mnt\/disk3    ext4    defaults,nofail    0    2\nLABEL=disk4    \/mnt\/disk4    ext4    defaults,nofail    0    2\nLABEL=disk5    \/mnt\/disk5    ext4    defaults,nofail    0    2\nLABEL=disk6    \/mnt\/disk6    ext4    defaults,nofail    0    2\nLABEL=disk7    \/mnt\/disk7    ext4    defaults,nofail    0    2\nLABEL=disk8    \/mnt\/disk8    ext4    defaults,nofail    0    2\nLABEL=parity   \/mnt\/parity   ext4    defaults,nofail    0    2<\/code><\/pre>\n\n\n\n<p>and then just under that, place in this block:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># mount the disks to \/mnt\/store with mergerfs\n\/mnt\/disk2:\/mnt\/disk3:\/mnt\/disk4:\/mnt\/disk5:\/mnt\/disk6:\/mnt\/disk7:\/mnt\/disk8 \/mnt\/store fuse.mergerfs defaults,allow_other,use_ino,category.create=epmfs 0 0<\/code><\/pre>\n\n\n\n<p>it should look similar to the command you used earlier to make your merge just with a couple &#8220;0 0&#8221; at the end and &#8220;fuse.mergerfs&#8221;  in there.<\/p>\n\n\n\n<p>Save and exit that document, and then reload mergerFS mounts daemon<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -a<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5 &#8211; SnapRAID setup: Edit \/etc\/snapraid.conf<\/h2>\n\n\n\n<p>to set up SnapRAID for redundancy and &#8220;RAID-like&#8221; stuff, you just need to edit the snapraid.conf file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/snapraid.conf<\/code><\/pre>\n\n\n\n<p>Paste in this block but customize for all the disks in your setup<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Parity file location (on the parity drive)\nparity \/mnt\/parity\/snapraid.parity\n\n# Content files (used to track changes on each data disk)\ncontent \/mnt\/disk2\/snapraid.content\ncontent \/mnt\/disk3\/snapraid.content\ncontent \/mnt\/disk4\/snapraid.content\ncontent \/mnt\/disk5\/snapraid.content\ncontent \/mnt\/disk6\/snapraid.content\ncontent \/mnt\/disk7\/snapraid.content\ncontent \/mnt\/disk8\/snapraid.content\n\n# Data disks (these are the actual files SnapRAID protects)\ndata d2 \/mnt\/disk2\ndata d3 \/mnt\/disk3\ndata d4 \/mnt\/disk4\ndata d5 \/mnt\/disk5\ndata d6 \/mnt\/disk6\ndata d7 \/mnt\/disk7\ndata d8 \/mnt\/disk8\n\n# Exclude system and temp files\nexclude *.log\nexclude *.tmp\nexclude *.bak\nexclude \/lost+found\/\nexclude .Trash-*\nexclude .recycle\/\nexclude .snapshots\/\nexclude .DS_Store\nexclude Thumbs.db<\/code><\/pre>\n\n\n\n<p>Save and exit that.<\/p>\n\n\n\n<p>And run the first sync! You may encounter an error if there is no data. Make a document in your mergerfs share.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"test merger files\" &gt; \/mnt\/store\/text.txt<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>snapraid sync<\/code><\/pre>\n\n\n\n<p>Scrub for integrity<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>snapraid scrub -p 5<\/code><\/pre>\n\n\n\n<p>And check status of snapraid<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>snapraid status<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6 (OPTIONAL) &#8211; Crontab syncs<\/h2>\n\n\n\n<p>This can be used if you&#8217;re in a home environment and files aren&#8217;t constantly changing, as each sync can take a few minutes and errors can happen. So if your drive is mainly static storage, like files, pictures, etc. then you can set up automatic syncs.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>crontab -e<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>0 2 * * * \/usr\/bin\/snapraid sync\n0 4 * * 0 \/usr\/bin\/snapraid scrub -p 10 -o 2<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide is-style-wide--2\"\/>\n\n\n\n<p>Hokay, so, that was pretty easy, yes?<\/p>\n\n\n\n<p>We mounted your drives, we merged them, and we synced them. Now we want to share them!<\/p>\n\n\n\n<p>You can choose NFS or SMB or however you would normally share a drive. You just have a single mount point now.<\/p>\n\n\n\n<p>I&#8217;ll give examples for a combination of NFS and SMB because that&#8217;s what I used. Each instruction can be used independently for your setup. NFS is easy, SMB is easy, but the combination of both led me into some late nights and cold sweats. I&#8217;ll show why later.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide is-style-wide--3\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Option 1 &#8211; NFS share<\/h2>\n\n\n\n<p>on the server, lets install NFS server<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt install nfs-kernel-server -y<\/code><\/pre>\n\n\n\n<p>Then edit the \/etc\/exports file<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/exports<\/code><\/pre>\n\n\n\n<p>and paste this in<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># exports with subfolders that are also shares for particular reasons\n\/mnt\/store\/ 192.168.0.0\/24(rw,sync,no_subtree_check,no_root_squash,fsid=0)\n\/mnt\/store\/nodes 192.168.0.0\/24(rw,sync,no_subtree_check,no_root_squash,fsid=1)\n\/mnt\/store\/vm 192.168.0.0\/24(rw,sync,no_subtree_check,no_root_squash,fsid=2)\n\/mnt\/store\/media 192.168.0.0\/24(rw,sync,no_subtree_check,no_root_squash,fsid=3)<\/code><\/pre>\n\n\n\n<p>Replace 192.168.0.0\/24 with the IP SUBNET of the network you&#8217;d like to share it to. <\/p>\n\n\n\n<p>I&#8217;ve included additional lines to show an example of sharing particular folders inside of the main share for specific purposes. For instance, using the mount as the backup share for proxmox, it makes multiple directories that get ugly in the main share if you use it for other services alongside it. So, I placed it inside a &#8220;nodes&#8221; folder and shared that to the proxmox nodes.<\/p>\n\n\n\n<p>Similarly, my plex server, I didn&#8217;t want all my media being dispersed in the main share.<\/p>\n\n\n\n<p>And for my VMs to have their own mount point for NextCloud &#8212; you get the idea.<\/p>\n\n\n\n<p>For just one NFS share because you&#8217;re normal and awesome:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># or just one share\n\/mnt\/store 192.168.0.0\/24(rw,sync,no_subtree_check,no_root_squash,fsid=0)<\/code><\/pre>\n\n\n\n<p>Now export that share and restart NFS<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exportfs -ra\nsystemctl restart nfs-kernel-server<\/code><\/pre>\n\n\n\n<p>Verify exports<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/etc\/exports<\/code><\/pre>\n\n\n\n<p><strong>On the client PC:<\/strong><\/p>\n\n\n\n<p>Install the NFS client:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt install nfs-common<\/code><\/pre>\n\n\n\n<p>and mount the share<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mount -t nfs &lt;your-server-ip&gt;:\/mnt\/store \/mnt\/store_remote<\/code><\/pre>\n\n\n\n<p>replace &#8220;your-server-ip&#8221; with your server IP.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide is-style-wide--4\"\/>\n\n\n\n<p>So, this is where I ran into issues. Things like ProxMox want to run as root, things like Windows want authentication and a specific user, things like containers and VMs use different users for different services, each have different permissions.<\/p>\n\n\n\n<p>So, when you expose the NFS share to a subnet for proxmox nodes, you don&#8217;t want to have to authenticate each node each time. The &#8220;no_root_squash&#8221; part should take care of this but in case it doesn&#8217;t, you can change the permissions to &#8220;nobody:nogroup&#8221; which is essentially opening it up to guest access.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Try not to use nobody outside of testing\nchown -R nobody:nogroup \/mnt\/store\nchmod -R 775 \/mnt\/store<\/code><\/pre>\n\n\n\n<p>We&#8217;ll get into permissions after this.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide is-style-wide--5\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Option 2 &#8211; Samba (SMB) for Windows\/MacOS<\/h2>\n\n\n\n<p>on the server:<\/p>\n\n\n\n<p>Install Samba:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update\napt install samba<\/code><\/pre>\n\n\n\n<p>edit \/etc\/samba\/smb.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/samba\/smb.conf<\/code><\/pre>\n\n\n\n<p>and place in the following<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;store] \npath = \/mnt\/store \nbrowseable = yes \nread only = no \nguest ok = yes \nforce user = nobody<\/code><\/pre>\n\n\n\n<p>and restart samba!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart smbd<\/code><\/pre>\n\n\n\n<p>For more control, your config might look more like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;store]\n   comment = MergerFS Pooled Storage\n   path = \/mnt\/store\n   browseable = yes\n   read only = no\n   writable = yes\n   guest ok = no\n   valid users = @storageusers\n   force group = storageusers\n   create mask = 0664\n   directory mask = 2775\n   inherit permissions = yes\n   inherit acls = yes\n   vfs objects = acl_xattr\n   map acl inherit = yes\n   store dos attributes = yes<\/code><\/pre>\n\n\n\n<p>again, I&#8217;ll get into permissions after this option.<\/p>\n\n\n\n<p><strong>On the Windows PC to map the network drive:<\/strong> (sorry Mac I have no idea how you do this, so I won&#8217;t share it as it might be incorrect)<\/p>\n\n\n\n<p><strong>Windows<\/strong>: <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Open File Explorer \u2192 <code>\\\\your-server-ip\\store<\/code><\/code><\/pre>\n\n\n\n<p>or This PC, right click in the blank space where your hard drives are shown, and select &#8220;add network drive&#8221;. and paste in the thing.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>\\\\your-server-ip\\store<\/code><\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide is-style-wide--6\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Permissions!!! UGHHHH!<\/h2>\n\n\n\n<p>We&#8217;re here! Permissions.<\/p>\n\n\n\n<p>Windows might throw an error at you for trying to map to the monster of a NAS you just made. Don&#8217;t be discouraged, it&#8217;s just that you might not have an actual user for smb! If SMB still doesn&#8217;t work after this we can look at the server more in depth.<\/p>\n\n\n\n<p>Let&#8217;s create a user on the server to use SMB. We&#8217;ll call him&#8230; SIMBA? Sure, Simba. idk dude I don&#8217;t name things.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adduser simba\nsmbpasswd -a simba<\/code><\/pre>\n\n\n\n<p>remember to update your smb.conf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/samba\/smb.conf<\/code><\/pre>\n\n\n\n<p>have it include this additional line, [store] representing the share name made earlier. You don&#8217;t need to include this.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;store] \nvalid users = simba<\/code><\/pre>\n\n\n\n<p>restart smb<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart smbd<\/code><\/pre>\n\n\n\n<p>Re-map it in Windows, hopefully that did it for ya. Took me a while because I didn&#8217;t understand how smb shares worked on linux to windows.<\/p>\n\n\n\n<p>But!!! I didn&#8217;t work on NFS permissions yet. We&#8217;re still working on guest! or, nobody, in linux.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">NFS Permissions<\/h2>\n\n\n\n<p>So, remember that I mentioned ProxMox runs things in root? Well, containers (specifically, what runs on them) don&#8217;t. Windows doesn&#8217;t. Whatever else might pop up will also be different.<\/p>\n\n\n\n<p>So, make things easy, we can make a group, and append users to that group, so you only need to allow the group. alternatively, you can use ACLs! (Access Lists). These are a little bit more complicated but make it so you don&#8217;t specifically change permissions directly. It&#8217;s more like adding a port to an IP instead of changing the IP. Or for artistic folk, adding a mask to a layer instead of painting directly on the file.<\/p>\n\n\n\n<p>I&#8217;ll go with direct permissions for now:<\/p>\n\n\n\n<p>add a user to a group:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>useradd -m -G \"storageusersgroup\" \"simba\"<\/code><\/pre>\n\n\n\n<p>Change the group to whatever and the newuser &#8220;simba&#8221;. Which can also be whatever. <\/p>\n\n\n\n<p>Add the group permissions to the share:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># prep users for being added to share\nchown -R simba:storageusersgroup \/mnt\/store\nchmod -R 2775 \/mnt\/store<\/code><\/pre>\n\n\n\n<p>This then can also be applied to your SMB setup:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/samba\/smb.conf<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;store]\n   valid users = @storageusersgroup\n   force group = storageusersgroup\n   create mask = 0664\n   directory mask = 2775\n   inherit permissions = yes\n   inherit acls = yes\n   vfs objects = acl_xattr\n   map acl inherit = yes\n   store dos attributes = yes<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart smbd<\/code><\/pre>\n\n\n\n<p>And now, simba has access to both NFS and SMB. Well, actually, his GROUP does! <\/p>\n\n\n\n<p>But, you can also include root in that game too.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># prep users and root for being added to share\nchown -R root:storageusersgroup \/mnt\/store\nchmod -R 2775 \/mnt\/store<\/code><\/pre>\n\n\n\n<p>This adds root, and the group simba is in.<\/p>\n\n\n\n<p>I&#8217;ll chirp the usual &#8220;don&#8217;t allow root access to your file shares&#8221;.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Summary<\/h2>\n\n\n\n<p>We formatted, mounted, merged, synced\/balanced, shared over NFS and SMB, mounted those shares, and made sure permissions allowed us to do so.<\/p>\n\n\n\n<p>This allows me (and you) to use any number of any type of any size of drives for one big file share that can be used for just about any device.<\/p>\n\n\n\n<p>My next goal is to use this share to then mount to my Plex\/Jellyfin servers, and link it up to Sonarr, Radarr, and all the other *arr tools. <\/p>\n\n\n\n<p>To do this, we&#8217;ll be making sure things are locked down without root, ensuring nothing important\/damaging on this server, proper monitoring, logs, and whatnot to be sure things are secure first. <\/p>\n\n\n\n<p>I hope you also gained something from this! If you followed along, you now have a robust and flexible NAS that can kinda handle everything you throw at it (literally).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally got around to building a NAS out of my home server. I used MergerFS and SnapRAID to turn my ProxMox node into a single mountable network drive that had redundancy, while being able to swipe a drive and throw it into another PC and still read that data without overhead or formatting. And [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":4715,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,6],"tags":[29,41,43],"class_list":["post-4714","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-homelab","category-it","tag-homelab","tag-proxmox","tag-server"],"jetpack_featured_media_url":"https:\/\/blog.dabbleden.com\/wp-content\/uploads\/2025\/09\/serverman.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/posts\/4714","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/comments?post=4714"}],"version-history":[{"count":5,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/posts\/4714\/revisions"}],"predecessor-version":[{"id":4725,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/posts\/4714\/revisions\/4725"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/media\/4715"}],"wp:attachment":[{"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/media?parent=4714"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/categories?post=4714"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dabbleden.com\/index.php\/wp-json\/wp\/v2\/tags?post=4714"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}