DIY NAS with Proxmox and Xpenology

Interesting video on one way to build DIY NAS with your own hardware.

It's also possible to do this with the Terramaster hardware:

I believe there are a few people here using proxmox with good results.

Also some good Proxmox videos on the Learn Linux TV You Tube channel

Been running Proxmox for a few months on an Intel NUC 13th Gen i5. Very pleased with the results.

I have Plex and Channels in LXC's and a VM running docker.

Was very simple to set up.

Proxmox rocks! Couldn't be happier with it -- it's transformed my approach to computing in many ways. I run Docker in multiple LXCs though, as it works great, and is more economical resource-wise than VMs.

I've thought about running docker in an LXC, but I also wanted to get some experience with Debian.

Are your LXC's privileged or unprivileged? I used thr Ttheck helper scripts to set up Plex and Channels but they only work as privileged and I am considering going back and updating them since I have port forwarding set up for both.

In fact one of the cool things you can do is take an existing system, install a new boot drive for Proxmox, and take the original boot drive and pass it through to a newly created VM. This way, the original system is now virtualized, but with with Proxmox as a hypervisor, you can add whatever other desired virtualizations.

Much, much better than trying to add VirtualBox or other VM platform on top of an existing OS. Keep in mind the target machine does need to have a reasonable number of CPU cores and/or threads (as those become vCPUs) and RAM to make a good Proxmox platform. Over-provisioning on vCPUs is acceptable, but not on RAM. A large NVMe makes a great Proxmox boot drive.

1 Like

Always unprivileged. You're losing an important benefit of containerization (isolation from the host OS) with privileged LXCs.

1 Like

So you have multiple dockers running? It was unclear how to set it up.

Yes. The main thing to know is that you need to add the following two lines to the .conf file for the specific LXC (found under /etc/pve/lxc/<id>.conf on the Proxmox host):

lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir

EDIT: Mounting network shares to an unprivileged LXC can be a tad tricky, but this post I did on the Proxmox forum details how to do it for Samba shares. I assume the process is similar for NFS:

EDIT2: Not that it makes a huge difference, but my LXCs are always Debian-based (Debian 11 for Proxmox 7, and Debian 12 for Proxmox 8) keeps things nice and consistent when working from the command line, same tools same syntax when moving between the Proxmox host and the Docker host.

2 Likes

Probably a bad idea to pirate Synology's operating system, DSM. If one wants a nicer interface to manage to NAS, True NAS will work well.

I use True NAS Core as my Hypervisor right now and yes it's Bhive under the hood. The idea to pass the boot drive to Proxmox is interesting saving one step if I move to Proxmox. I'm considering this as I run a Windows VM for a few applications that require Windows and so far the TSM is not passed through to Windows via True NAS so I can't upgrade that VM to Windows 11. I've heard that Proxmox upgrades are not simply click and go. Is this correct?

Will this handle making the shares writeable? I have my Channels Directory on an SMB share and I got it mostly working, but Channels would not start due to not having writable permissions.

1 Like

You need to provide write privilege for the user that runs Channels DVR. This is true for any NAS or OS share.

Yes. That's exactly what I do with OliveTin to support access to Channels DVR files.

EDIT: Your fstab file on the Proxmox host makes the connection to your Samba shares, and the permissions are set by adding 100000 to your desired user and group IDs in the LXC. So /etc/fstab on your Proxmox host would look something like this:

//media-server/tv\040series /mnt/tv_series cifs x-systemd.automount,username=User\040Name,password=Password,uid=101000,gid=101000 0 0
//media-server/movies       /mnt/movies    cifs x-systemd.automount,username=User\040Name,password=Password,uid=101000,gid=101000 0 0
//media-server/backup       /mnt/backup    cifs x-systemd.automount,username=User\040Name,password=Password,uid=101000,gid=101000 0 0

Note the uid and gid "101000", this will passthrough to the LXC as "1000". Then you need mount points in your <id>.conf file:

mp0: /mnt/tv_series/,mp=/mnt/tv_series
mp1: /mnt/movies/,mp=/mnt/movies
mp3: /mnt/backup/,mp=/mnt/backup

The Proxmox forum link above has more detail.

2 Likes

Which device is that on your host? It could be different for everybody.

Edit: For me that is /dev/net/tun

root@pve1:/dev/net# ls -la
total 0
drwxr-xr-x  2 root root      60 Mar  9 11:15 .
drwxr-xr-x 19 root root    4700 Mar  9 11:15 ..
crw-rw-rw-  1 root root 10, 200 Mar  9 11:15 tun

I've done it it multiple times now, once passing through an original boot NVMe as a PCIe device (more complicated), and another by simply passing through the original drive as a SATA device.

Among the advantages of going this route is that you still have the option to boot from the original drive as a failsafe. I never needed to, but I was happy to have it as an option when I was virtualizing my Home Theater PC/Server.

Minor releases are no big deal, but major releases are another matter. I started on Proxmox 7.x, and have two running on that release. My mobile "super router" which runs OpenMPTCProuter, ROOter and Docker is using Proxmox 8.x on a 4 ethernet port "industrial" PC.

For me there's nothing particularly compelling about 8 vs 7, much like I feel about Debian 12 vs 11. :slight_smile: I'm pretty sure a few things would break trying to do an in-situ upgrade, just like most OS major releases.

The short answer is, when I do decide there's a compelling reason to upgrade, I'll most likely do it with new hardware -- as moving VMs and LXC containers between systems is pretty easy.

That's an interesting question. The first LXC I ever setup with Docker uses the "file" approach you describe to /dev/net/tun, but since then I've been using the "dir" approach using /dev/net. Both work.

lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net/tun dev/net/tun none bind,create=file
lxc.cgroup2.devices.allow: c 10:200 rwm
lxc.mount.entry: /dev/net dev/net none bind,create=dir

Thank you

Just to add to this point a bit, Proxmox does most of the functions that one might associate with a NAS these days. The notable exception is having a nice WebUI or GUI driven interface for managing storage.

However, this is easily added, or may already be present in a VM you'd have running. For me, as an example, I've been using DrivePool under Windows for many years. It meets my needs exactly, as it allows me to create one or more large network shares using multiple drives. Folder duplication is easy, as is adding or subtracting disks.

DrivePool was something I was familiar with, and had a proven track record with -- not to mention that all of my data was already stored using this product. With Proxmox, I created a Windows VM, passed through my existing boot drive and all of my DrivePool drives. Nothing else was required.

So whether you're a fan of TrueNAS, Unraid, OpenMediaVault, Windows with DrivePool, or Windows with Storage Spaces -- any of these can be used to provide an elegant way to manage your network storage. Use what you're already familiar with, use an open source NAS OS, or use Windows -- any one will do the job. It's also possible to use the tools Proxmox provides, but is mostly via the CLI, and unless your day job already involves familiarity with ZFS and/or Ceph I'd steer clear of that approach.

Do you notice a performance drop to your DrivePool under Proxmox? I'm a photographer and backup my photo library from my workstation to TrueNAS with a full every month over a 10-GB LAN. It takes many hours over this optimized setup.

I haven't noticed any performance drop, but I use Veeam Backup & Replication (another legacy Windows tool for me) and everything (including full backups every 30 days) happens overnight. Their Community Edition supports up to 10 clients. Backups start at 12:30am, and when incremental, are done in a few minutes -- followed by shutting the system down. Full backups can take more than an hour, but I'd imagine I don't have nearly the data to transfer that you do.