Advice Needed on Setup (ZFS Pool, Shares, Passthrough)

IronSheepdog

New Member
Mar 6, 2022
8
0
1
42
Snyder County, Pennsylvania
I am relatively new to Proxmox, coming from TrueNAS Core. I built my own machine for TrueNAS, but decided to upgrade to a Dell Poweredge R720. I pretty much had to because of all of the services I started to run. Plus, I just wanted to have everything in one place. I don't have the funds for multiple machines. Anyway, my initial plan was to virtualize TrueNAS in a VM and pass the H310 raid controller (it's in IT mode) to the VM and have TrueNAS handle the ZFS pool. Well, since I have other drives that are on the controller that are not going to be part of the ZFS pool, I just learned that I cannot pass those drives individually to other VMs unless I create network shares in TrueNAS. So, I believe I'm going to ditch the idea of TrueNAS altogether and have Proxmox run the ZFS pool, shares, etc. Here is where I need advice. I know I can create a RaidZ2 ZFS pool in Proxmox and do Samba shares as well.

- I plan to install Plex in a VM or container. I'm guessing I can create a directory (similar to a dataset in TrueNAS) in the ZFS pool for the Plex container/VM to use to store the media files. Can this same directory also be shared as a network folder for my other computers to access the media files?
- I plan to install Nextcloud in a container. I don't plan on any network shares with this. I just want to be sure that I can create a directory in the ZFS pool to hold the files for Nextcloud.
- My question for Plex relates to this one. If I passthrough a directory from the ZFS share to a VM/container, can I still create a network (samba) share out of that directory?
 
I have just such a setup working at home. I have Plex running as a container accessing fileshares (mountpoints) that are also Windows shares as well. Additionally, I run a dedicated music server to stream to my hifi from the same shares.

Two points though, with a container setup like mine - you can't do hardware transcoding. If that's a requirement then you would need to run Plex as a VM and pass through a spare GPU (which is a whole other topic) - but in that case mountpoints are not possible so what ever OS you are running Plex under would need to access the media files as SMB shares. Second point is that you need to do a bit of planning and work to harmonise file permissions on the shares between the host and container, but once this is setup and working, you're good to go.

AFAIK, it's not quite so simple to allow Nextcloud to host those shares although you will be able to run NextCloud with file storage backed by the ZFS Pool as you indicated.
 
I have just such a setup working at home. I have Plex running as a container accessing fileshares (mountpoints) that are also Windows shares as well. Additionally, I run a dedicated music server to stream to my hifi from the same shares.

Two points though, with a container setup like mine - you can't do hardware transcoding. If that's a requirement then you would need to run Plex as a VM and pass through a spare GPU (which is a whole other topic) - but in that case mountpoints are not possible so what ever OS you are running Plex under would need to access the media files as SMB shares. Second point is that you need to do a bit of planning and work to harmonise file permissions on the shares between the host and container, but once this is setup and working, you're good to go.

AFAIK, it's not quite so simple to allow Nextcloud to host those shares although you will be able to run NextCloud with file storage backed by the ZFS Pool as you indicated.
Wow. Thanks! I appreciate the knowledge. It's good that you told me about the GPU not being able to be passed through to a container. My plan was to pass through an old nVidia Quattro for hardware encoding. You definitely saved me some headache.
As for Nextcloud, what I had to do with it in TrueNAS was store the files in the jail itself and then backup the jail. If I mounted a share or separate dataset, Nextcloud treated it like attached storage. It sounds like it's the same deal for Proxmox.
 
I have just such a setup working at home. I have Plex running as a container accessing fileshares (mountpoints) that are also Windows shares as well. Additionally, I run a dedicated music server to stream to my hifi from the same shares.

Two points though, with a container setup like mine - you can't do hardware transcoding. If that's a requirement then you would need to run Plex as a VM and pass through a spare GPU (which is a whole other topic) - but in that case mountpoints are not possible so what ever OS you are running Plex under would need to access the media files as SMB shares. Second point is that you need to do a bit of planning and work to harmonise file permissions on the shares between the host and container, but once this is setup and working, you're good to go.

AFAIK, it's not quite so simple to allow Nextcloud to host those shares although you will be able to run NextCloud with file storage backed by the ZFS Pool as you indicated.
So, just an update. I originally had Nextcloud installed on my local-lvm. I just changed it. I created a ZFS pools (ZFS01) and then created a directory on it (ZFS01/Nextcloud). I then moved the container to the Nextcloud directory so now everything is on the ZFS pool. I'm hoping everything is kosher with that.

At this point I'm still trying to figure out how to create a dataset on the ZFS pool just for my media (videos, photos, movies, etc.). I'm assuming create a directory (ZFS01/Media)? Would I then have to use a VM like OMV to add a hard drive (the Media directory) and then share it as a SMB share? Then the SMB share would be accessible to Plex, other Windows computers, etc.
 
The way I would do it is to use ZFS datasets for each category (TV,Movies,Music etc) because of things like snapshots, quotas, space accounting, copying and backing up - e.g

Code:
zfs create -o mountpoint=/MediaShare MyPool/PlexMedia
zfs create -o mountpoint=/MediaShare/TV MyPool/PlexMedia/TV
zfs create -o mountpoint=/MediaShare/Movies MyPool/PlexMedia/Movies

ls /MediaShare
Movies           TV

These folders are then shared across the network as SMB shares via Samba running on the host. Some people would mount these folders in a container running Samba to avoid contaminating the integrity of the host system. Personally, I don't see any problem running Samba on the host as it's one of the standard Linux packages so it's unlikely to cause any issues. Whichever, the end result is broadly the same.

You then need to decide if you want authenticated or anonymous access to these folders or not. Obviously you would want to treat personal shares differently, but for media shares anonymous access makes things a bit easier IMO as I want to be able to share with various devices, operating systems and users without getting bogged down by usernames and passwords. But I'll share a simple trick I use which makes default network access to my media shares read-only so files can't get deleted/moved/over-written by accident.

Here's a sample of my samba config file

Code:
[global]
workgroup = WORKGROUP
server string = NAS01
local master = yes
domain master = yes
preferred master = yes
os level = 255
password server = None
guest ok = yes
guest account = samba
security = SHARE
#printcap name = /etc/printcap
netbios name = nas01
min protocol = SMB2

# These improve performance
large readwrite = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE

[lib]
path = /MediaShare
browseable = no
guest ok = yes
writeable = yes
create mask = 0755

[Movies]
path = /MediaShare/Movies
guest ok = yes
browseable = yes
writeable = no

[TV]
path = /MediaShare/TV
guest ok = yes
browseable = yes
writeable = no

So if you browse to //nas01 you will see two folders - Movies and TV - and these folders and their contents will be read-only. However, we also have a share called lib which is not visible - if you now open //nas01/lib you will see the two Movies and TV folders but now they will be writeable.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!