(solved) Noob asking for some help: Setting up a Linux NAS

If this is in the wrong thread, or tagged wrong then let me know. This is literally my first post here so I have no clue.

Hi there.

Just gonna start by saying that I am more or less a noob/beginner in Linux in general. I have had some attempts at running it from time to time over the last two decades, but never really got into it (first was way back when my Pentium MMX PC was too slow for Win XP and I decided I wanted to try something else). So if I look like I have no clue what I’m talking about, then that’s because I really don’t.

Anyway, let’s get to the issue at hand:
I am looking into setting up a NAS using some old consumer grade hardware I have laying around. It won’t be massive, but it will be plenty for my use for now at least (Thinking 8x8tb drives in maybe raid 5 or something like that). The issue is that I really have no idea where to start with this. I have some of the drives at hand as well as some smaller ones I might use if possible, but the hardware should all be here other than a SAS/SATA card if that is needed.

Anyway, if anyone has any pointers for a complete beginner friendly guide for setting this stuff up then that would help a lot. I’m thinking maybe running something based on Debian since I use Pop_OS! on my laptop and am slowly getting used to Linux through that and not having to deal with different package-managers and that stuff would help a lot. Though something tailor-made would be fine I suppose if it is going to be a much better experience from day to day.

Anyway, thanks for taking a look at my thread. Hopefully someone can point me in the right direction.

If hardware is important at all:

  • Intel i5 3570k
  • 16gb DDR3
  • Intel DZ77GA-70K (motherboard), which has 8 SATA ports that might be usable.
  • Toshiba N300 8TB drives
  • Maybe an older 120gb/250gb SSD for cache or boot drive.
3 Likes

I would start with what you plan to accomplish with your NAS. I for example have a cold storage NAS. Basically, 16TB (4x8) and a Live NAS (4x12) Very little content streaming, and some cloud functionality (I can remote in and drop files from another device if needed)

I believe there will be comments coming in advocating for ZFS, TrueNAS, FreeNAS and some really simple back up tools, but the question remains, What do you need it for? Stream local media, file storage/access, personal cloud? Narrow it down a bit and you’ll get to where you need to be.

If you just want to play around, set up your drives, and ssh into the box, host some vm’s maybe even backup/sync some directories with syncthing.

4 Likes

I’m mostly looking to use it for the same thing I have been using my external Hard-drive case for, I’m just tired of it crapping out on me for the 10th time today so I’m looking for something I have more control over.

What that entails is mostly this:

  • Storage of any larger files that isn’t immediately needed on my desktop or laptop.
  • Streaming media content over the local network (maybe even over the internet if that can be set up securely).
  • Storing files that I want access to from multiple devices at the same time (at the moment I get around that with setting my Win10 computer up with a shared folder).

I have looked into what ZFS actually is, though in all honesty I have zero experience with it. If it’s as practical as it sounds then I might want to use it, but then again I have no experience setting anything like that up.

Should I update the main post with this stuff? or is this sufficient?

1 Like

Yeah, sounds good to me, There are various ways to do this, all with varying degree of difficulty. FreeNAS or a PLEX media server sound like they can be good for you in my opinion.

1 Like

I have a Debian fileserver- I just use NFS so that I can connect from all the other debian machines. If you have some windows machines (no judgement), then you can set up a samba share instead.

I would recommend using mdadm raid and ext4 for the filesystem. It’s not sexy or containerized, but it works and you don’t have to think too hard about it. IIRC, ZFS on debian isn’t an off the shelf solution. BTRFS was supposed to be the chosen one, but I haven’t seen any compelling reason to use it yet. To be fair, I might have missed it.

HIgh level outline:

  • install debian on your boot drive/SSD
  • set up raid/filesystem (this can take a while to sync, but you can use the raid while it is syncing. It’s pure black magic and I try not to think to hard about how that’s possible)
  • tuning your raid- break out your calculator, or find one online.
  • set up nfs file sharing
  • profit!!

There are file sharing OS systems out there- I think TrueNas is one of them. I’ve never used it, but it might be a more turnkey solution.

Post if you have any questions!

1 Like

Perhaps openmediavault? Essentially a web based gui built on Debian, lots of tutorials for it online.

1 Like

There’s a question over how much drive flexibility do you want/need.

If you need a lot of space, ZFS can be great. If you want a more value oriented setup, then BTRFS or mergerfs+snapraid are where it’s at (perfectmediaserver.com has details on that setup).

I tried writing a guide for btrfs a while back, but I suck at writing and there’s a few things I’d change in that setup…

… regardless of the setup (zfs, btrfs, mergerfs… or if you want a prebaked truenas scale or omv or proxmox) practicing setup with smaller virtual VM disks is a good idea…

1 Like

Have a look at Unraid, perhaps not as FOSS as some would like, but you can get a trial easily and see if it suits your needs.

I have Unraid running locally, with shares configured with SAMBA. I also run lots of extra stuff like Plex inside docker containers. The actual drives are XFS encrypted.

Edit: Unraid will run nicely on your hardware. The only thing you will need is a USB stick with a unique GUID, as Unraid installs to that USB stick and loads into system memory from the USB stick.

1 Like

As Magnus mentioned you’re going to get a lot of different recommendations and ways to accomplish to same thing. All the requirements you mentioned can be met with a Debian server, TrueNAS Core (formerly known as FreeNAS), TrueNAS Scale, or by running purpose build VMs from a hypervisor like Proxmox. But initial configuration and ongoing maintenance will be very different between the products.

Linux Server (Debian, Ubuntu, Alma, etc) - A great to learn linux but the most painful option for a noob IMO. Not only will you need to manually configure Samba, user accounts, and file permissions from the command line, but you’ll also need to install routine security patches and package updates. But flexibility is the biggest advantage when going this route. You can run docker images, snaps, and even configure it to run as a hypervisor. Plex Media Server can be installed as a snap which automatically updates to the latest version and this would greatly increase the security when exposing it to the internet. Of if you wanted access to Plex only from your devices you could install a WireGuard VPN on the server and for added security. The options are endless.

TrueNAS Core/Scale - There will be an initial learning curve when it comes to configuring your storage volumes. But if you don’t mind reading the documentation it’s excellent and on the level you would expect from an enterprise product. System updates are painless and can be done with a single click. As an added bonus, you can run a handful of 3rd party apps and plugins on the server inside what they call a jail. Plex Media Server is one of the offerings and can be deployed with a single click. On the downside TrueNAS is a purpose driven appliance. It’s primary focus is on storage with very little flexibility outside what it’s designed for. TrueNAS Scale (still in beta) seems to provide a little additional functionality as to act as a hypervisor but this isn’t something I’ve had an opportunity to test drive yet.

Hypervisor (Promox, VMware, XCP-ng, Hyper-V) - Installation and initial configuration is moderately difficult but well documented. Expect issues driver and compatibility issues if trying to deploy VMware or Hyper-V on desktop class hardware. Proxmox is probably the least painful of the bunch. The advantage to this approach is you can now run virtually anything as a VM or container. Take all the good points from the Linux Server section above and add them here too. You could run a dedicated VM just as your file server and another just for Plex Media Server. But configuration of storage for your VMs will require some planning. And you’ll probably want a little more RAM if going the hypervisor route but that should be fairly cheap.

Hope that helps

1 Like

Wow, a bunch of answers on here since I last checked. Now let’s see if I can find some answers for all of this.

gee_one: I would recommend using mdadm raid and ext4 for the filesystem. It’s not sexy or containerized, but it works and you don’t have to think too hard about it. IIRC, ZFS on debian isn’t an off the shelf solution. BTRFS was supposed to be the chosen one, but I haven’t seen any compelling reason to use it yet. To be fair, I might have missed it.

Four0Four: Linux Server (Debian, Ubuntu, Alma, etc) - A great to learn linux but the most painful option for a noob IMO. Not only will you need to manually configure Samba, user accounts, and file permissions from the command line, but you’ll also need to install routine security patches and package updates. But flexibility is the biggest advantage when going this route. You can run docker images, snaps, and even configure it to run as a hypervisor. Plex Media Server can be installed as a snap which automatically updates to the latest version and this would greatly increase the security when exposing it to the internet. Of if you wanted access to Plex only from your devices you could install a WireGuard VPN on the server and for added security. The options are endless.

risk: There’s a question over how much drive flexibility do you want/need.
If you need a lot of space, ZFS can be great. If you want a more value oriented setup, then BTRFS or mergerfs+snapraid are where it’s at (perfectmediaserver.com has details on that setup).

See this is what I initially wanted. Something where I would have more control over it all and could more or less customize it to what I want/need. I looked into Ubuntu server at one point, but the guides clearly expect a deeper understanding of the underlying concepts of it all than I have at the moment. I also read risk’s guide at one point, and while it seems detailed it’s way over my head at the moment.

Vladimir_Sharpie: Perhaps openmediavault? Essentially a web based gui built on Debian, lots of tutorials for it online.

ImAllOutOfGum: Have a look at Unraid, perhaps not as FOSS as some would like, but you can get a trial easily and see if it suits your needs.

Four0Four: TrueNAS Core/Scale - There will be an initial learning curve when it comes to configuring your storage volumes. But if you don’t mind reading the documentation it’s excellent and on the level you would expect from an enterprise product. System updates are painless and can be done with a single click. As an added bonus, you can run a handful of 3rd party apps and plugins on the server inside what they call a jail. Plex Media Server is one of the offerings and can be deployed with a single click. On the downside TrueNAS is a purpose driven appliance. It’s primary focus is on storage with very little flexibility outside what it’s designed for. TrueNAS Scale (still in beta) seems to provide a little additional functionality as to act as a hypervisor but this isn’t something I’ve had an opportunity to test drive yet.

I have looked into purpose built stuff for this, and all the mentioned ones were looked at (Openmediavault, TrueNAS, and Unraid). The only thing I don’t really like about these ones (except Unraid having a 100$ upfront cost, which to be fair is way better than any subscription model) is the lack of control something like this would give me. It would be way better than what I currently have, but it wouldn’t give me the amount of control I kinda want. Still for a noob like me, something like this seems to be a much better choice for now anyways.

So with all that in mind:
It seems like I’m best off choosing something purpose built, at least for now. Then maybe look into transitioning to something like Debian or Ubuntu Server down the line once I actually know how things work. Maybe even run them in a virtual machine and toy around with them on my free time to see how stuff actually works (at least for things that I can’t or don’t want to do directly in Pop_OS!).

Now, the only question I have is this… Is there any reason to go for Unraid compared to Openmediavault or TrueNAS? Does any of these offer me the opportunity to use drives of unequal sizes while still giving me drive parity to some extent? I know a traditional RAID setup ideally should be run on all identical drives for an optimal setup, so I figured I should ask.

Oh, and sorry for the wall of text.

2 Likes

So with ZFS it’s perfectly fine to have different size drives in the same pool. But inside each pool is a group of physical disks called a vdev. All your disks within a vdev will need to be same size or I believe capacity will be limited by the smallest disk.

So if you had 6 x 1TB drives in vdev1 and 8 x 5TB in vdev2 this would be okay. But not 14 randomly sized drives.

Edit: Bad example. Increased quantity of drives

1 Like

I see, so if I group up my 4tb drives in one vdev and my 8tb ones in another then I won’t have that issue I guess. I’ll keep that in mind.

1 Like

Yes, but each vdev will need to have disk capacity set aside for redundancy. If you were to use RAIDz2 you’d be losing the capacity of two drives in each vdev. So having less than 6 drives in a vdev is less than ideal.

TrueNAS has a nice primer explaining ZFS if you’d like some more detail
https://www.truenas.com/docs/references/zfsprimer/

1 Like

by the way, ZFS is getting raidz expansion, the only question is when. It’s been in the works for many years and there’s a GitHub PR.

So it might actually not necessarily be the worst thing in the world to maybe do 4disk ZFS in an 8 bay case, and bet on ability to expand disk by disk, at some point you’ll want to get a second machine probably and upgrade the NAS motherboard anyway.

Solution 1:

For example if you got a machine with space for 8 drives, get 4x16TB disks to start.

And then you went with e.g. Arch Linux and RAIDz. (48TB usable).

This time next year, if you need to expand, you can get 1 more 16T disk, and then another and another and another… so you end up with 7x16T usable and one drive for parity.

It wouldn’t exactly be a cardinal sin to grow raidz1 to 8 disks of equal size over time, … it’s probably safer than if you bought 8 disks at the same time because of bath tub curve.

Also, ZFS supports native encryption, and it makes it easy to carve out a block device.

Trouble is, you kind of need to stick to 16T disks regardless of what’s a good single disk price on the market at the moment when you end up needing extra space.


Solution 2:

follow perfectmediaserver.com guide and start with 3 disks then buy 4th which is larger, then buy 5th which is larger, … and so on… always buy the cheapest dollar/byte disks.

Then if your storage stops growing, remove old disks, downgrade to fewer disks, or get a more power efficient, smaller motherboard and case and so on…
… it’s the ultimate in flexibility really.

Each disk can have a gpt partition table with:

  • EFI partition
  • boot partition for kernel,
  • LVM partition for actual storage
    • btrfs root for the os (expandable and realtime raid-able encrypted)
    • another LVM partition for bulk data, encrypted, as ext4 or xfs.

This is probably the most flexible setup, as you can swap distros on the fly, carve out more partitions or resize them up or down easily with LVM without having to move all the partition data around.
I’d use Debian on it, or Ubuntu server.


Again, please please please, try doing a manual install and all other stuff in a VM, see how it goes. It’ll go much faster when you want to set it up for real later on and there’s less of a chance you’ll paint yourself into a corner due to inexperience.

There’s a YouTube channel called EF Linux made simple where Ermanno has like 20 variations of various installs that you can look through and follow along and you can make your own tweaks along the way… and he’s not the only one doing this stuff.


If you want to run your own services … that comes with a bunch of complexity on top anyway, … the actual initial installation is easy in comparison… I’d avoid unRAID, OMV and so on for that reason… if you want to dump data on a box and that’s all … great… if you want anything else … ugh.

For example, jellyfin with quicksync acceleration, how do you get your own recent kernel and how do you pass it through to jellyfin to be able to use? In roll your own distro sense, it’s easy… With proxmox or truenas scale… or similar - No idea whether it’s even possible, let alone whether you’d make the whole thing super fragile and impossible to cleanly upgrade.

1 Like

I hear good stuff about Alex’s perfect servers, as suggested by @risk

it might be a little intense, but looks like a great project.

he even goes over the comparisons of a few other options.

If it looks too intense, perhaps Unraid? it might be the easier to approach, without the hassle of the better/more complicated stuff?

If you don’t use all your drives at once, just fill them as you go and add more later, then there is more chance of changing later, without having to loose all the data when switching.

If you lump all your drives together at once, you are kinda committed. Some technologies transfer (MDADM among linux systems, zfs between linux/bsd, but might have some slight config hurdles to jump through)

If you use snapraid / unraid, you get a bit committed, to their one system so just make sure you are comfortable?

1 Like

Main issue I see with Unraid is that there is an upfront cost to it all. I don’t mind paying for stuff, but I hate paying for something I never end up using or liking. So in that sense it’s probably better to look at the other alternatives unless there is somehow something that doesn’t work well in those compared to Unraid. My main concern is that I know virtually nothing about this stuff other than that I want network storage, and I don’t have a massive budget. Which is why I figured it might be good to start with something small like my existing old hardware and the drives I have at hand or am looking at buying. The Toshiba N300 drives are rated for up to 8 drives in an enclosure, so I don’t think I’ll be using those in anything if I ever end up going for a proper 4u rack at one point (8tb drives are also generally well priced here, though 10tb ones are decent from time to time). I’d simply start looking at enterprise drives at that point, and maybe delegate the current build for off site storage at a family’s house or something.

For now though I just need something simple that will work as I can’t really live with the way things are now (HDD enclosure controller board crashes when I try copying large amounts of files). I might look into setting up the hardware in a box with TrueNAS (haven’t seen anyone talk negative about that one yet) for a while with a spare drive just to see if it will work at all for what I want. I’ll also look into PMS and if that is doable.

Long term (likely several years down the line) I do want a proper server set up with a server focused distro and all that though, it just seems that this is way beyond my current capabilities. Don’t get me wrong, I’m sure I can set it up and get it working. Issue is that I have no idea how to do maintenance, and actually figure out stuff if something goes wrong. I’m just not learned enough on how things work yet to do that.

1 Like

Alright, so I have been spending the last few days looking over the proposed options and I think I have come to an actual conclusion. At least for now.

I think I’ll try to set it all up using the guides that are on the Perfect Media Server site. There are several reasons for this, but the most important ones for me right now are these:

  • The guides use Ubuntu Desktop as a base, and while I know I can install a GUI on top of Ubuntu server it is going to be really helpful to a noob like me to be able to at least do the initial setup in a familiar GUI that I have used before.
  • Utilizing a normal distro with stuff installed on top of it will give me a lot more flexibility than something that is essentially turnkey like Unraid, or Open Media Vault. While I’m sure these are powerful options, I like being able to customize everything to my needs if needed, and Ubuntu will essentially never be a real hinderance if I want to go from a small NAS in a bookshelf to a proper one in a server rack. The same principles would apply the entire way without me necessarily needing to relearn stuff.
  • Drive flexibility. This one is really important, as it not only gives me the opportunity to use all my existing drives but also go for what gives me most storage for my money at any time without posing a hindrance. I have been limited to a max capacity of 8tb drives in my current drive enclosure, so imagine my frustration when I found out that 14tb drives are only 30$ more at the moment… Being able to combine it all without having to throw away or dedicate drives to other usecases will be really helpful.

Anyways, that’s my current thoughts on it all. Let me know if I am way off the mark, or if there are real reasons for me to not take this route. Oh and I am really thankful for all the help here. Imay not know half the terms used in this thread, but it’s been really helpful and I have learnt more than I thought I would. So thanks.

3 Likes

That sounds like a good plan that fits you and your needs. You can always change or adapt it as your needs change.

1 Like

So… I can sort of understand why more streamlined solutions was suggested, because clearly I have a lot to learn even on the very basic level of how Linux works. Even something as simple as installing Docker is throwing me off since the linked sources of PMS simply assumes some basic knowledge before doing this stuff. This is of course something I just don’t have.

Fear not though, because if nothing else I am stubborn. So I will get it installed and working well enough given time. I just need to attack each piece of software separately as it’s own thing rather than the entirety of PMS at once. So I’ll do some Docker stuff while I do the burn-in rituals that Alex suggests for all new drives (of which I just got two new Toshiba MG series 14tb drives). Which I am lead to believe will take ages to get done (he mentions an 8tb drive taking a week).

Anyway… wish me luck I guess.

Link to the “Burn-in ritual”: New Drive Burn-In Rituals - Perfect Media Server

2 Likes

I have absolutely no doubt you’ll be successful with this approach. If you get stuck on along the way just create a new topic and I’m sure someone will be happy to help. Best of luck :slight_smile:

1 Like