Hey all, I’ve got ZFS pool created and just create a VM drive in that pool like normal, then Jellyfin just has that drive mounted. I think I’m losing the best parts of ZFS through this manner.
How should I set this up properly? Create a media pool or something and have VMs accessing the pool directly?
I mounted my zfs dataset in a Jellyfin VM using 9p. All the features of the host ZFS while still running in a VM
That works fine.
The other option is run a container instead of a VM and just pass-through a ZFS filesystem directly.
That might be a better option really. I might check that out. I kind if wish Proxmox had Docker integration instead of lxc but that’s a different topic.
The easy option is run docker in a privileged LXC container, it’s basically like running it directly on Proxmox and will have no permissions issues.
Oh, that works? That’s some inception level containering right there
Yup, you can do it unprivileged as well but permissions can be funky with any mount points shared with other containers.
I went with ZFS but had some issue where it would randomly disconnect completely and lock up the whole server until I rebooted. Probably something with the nvme I was using but I went back to ext4 and that resolved it.
Anyway my media drives are an lvmthin pool and just mounted to my LXC running jellyfin and such.
So if you’re going through the trouble of setting up proxmox, I would setup the majority of the storage in a ZFS pool for a TrueNAS SMB share/NFS share. Then create a small container just to host jellyfin and jellyfin’s cache–maybe commit 10GB of storage to it–really depends on how big your media library is. Mine is about 5TB and cache, metadata, and other misc things take up about 8GB.
Setting up your share is enough for jellyfin. Since the media and jellyfin are stored on the same metal, additional latency will be sub 100ms. Create a library in Jellyfin and set it to the share;
Movies: \\nas\Movies
,TV: \\nas\TV
, etc.Works flawlessly and would have more utility than allocating the entirety of your storage to your jellyfin container because it functions as a normal NAS. I’ve been running with a setup like this for a while and it works great.
Why bother with truenas? Just put the media in a zfs pool and mount it directly into jellyfin.
So you mount the pool to each vm that needs the shared data? Afaik zfs is not made for concurrency
Zfs (and most modern filesystems) are fine with concurrency.
I mount the same data store into several instances, it works well. Just needs some planning for permissions.
Could you explain further with a bit more detail? I havnt looked at this in a while but back then the options where virtiofs or nfs
Each cgroup container mounts a host path. That’s it.
So lxc containers and not vm’s
Yes, Lxc, docker, whatever cgroup2 isolation environment, but not VMS, true.
Vms can achieve the same thing through shares
Sure, you can also do this. But why not make it available to your network in addition to Jellyfin? What if you have a TV that doesn’t have access to the Jellyfin app? If it’s a private ZFS pool not on the network you’re fucked. If you share the media via a network share, you can always do any number of things to stream that media to your TV.
It gives you a ton more options up to and including just watching the media on your PC in your favorite media browser.
If it’s a private ZFS pool not on the network you’re fucked.
Sorry, i didn’t word that correctly. I understand why you might need a share, I just think a whole truenas instance just for a few shares is way overkill. If I needed a samba share, NFS export, or an iscsi lun i would just spin up a Debian container and be done with it.
You can do a share any number of ways. I simply banked on the fact that anyone willing to ask the question likely doesn’t know how to setup SMB shares without a GUI like TrueNAS.
Yes, not course. I forgot about the gui, that’s valid.
Setting up an SMB or NFS share is the correct answer because op has stated he plans to use VMs (plural). ZFS is not sharable without it. https://pve.proxmox.com/wiki/Storage
There are forum posts going back years about it :https://forum.proxmox.com/threads/share-zfs-storage-between-nodes.144790/ https://forum.proxmox.com/threads/create-a-large-pool-of-shared-zfs-storage.94435/
TrueNAS is not absolutely required. It can be done with a different Linux distro. I use/prefer Debian.
TrueNAS is not absolutely required.
It just seems to be the favorite. Anything would work. OMV, EasyNAS, OpenFiler, Rockstor, even just base *nix with the appropriate packages and config.
That seems very complex with a lot of overhead vs just mounting a ZFS pool into the container where jellyfin is running.
It’s frankly exactly as complicated as his postulated setup, only provides more flexibility. It’s the best outcome.
Are you suggesting creating a TrueNAS VM? Wouldn’t that be the same as what I’m doing now with creating an image in the ZFS pool?
You’d create a ZFS pool for your shares, then a TrueNAS VM which serves your ZFS pool as NAS. Then setup your Jellyfin VM using your NAS as storage for your libraries. Ends up looking like this: https://x0.at/Gbqm.png
Your media is accessible via the network from any device because they’re SMB shares, and it works just fine in Jellyfin. If you only create a ZFS pool for Jellyfin, your media can then only be accessed through Jellyfin. It limits your future options.
If you want to share storage you need some way of doing that. Zfs is a good option for storage on vm-host level, but ist not designed for shared usage. Im not sure what you are after, but maybe you want zfs storage inside the vm for snapshots, dedup etc? Or maybe you want to share your media storage between vm’s? The first case you can use zfs inside your vm, it does not know or care about how its disks are stored or of they are a physical drive. For the second use-case you want some way to share drives, like smb, nfs etc. or a distributed filesystem if you really want to over complicate things. Truenas might be over overkill for sharing a few volumes, but you need something. I believe you can share zfs over nfs now but i have never used that outside of proxmox cluster storage
I use both debian on a vm with samba+nfs and a bare metal truenas for my needs. Find your needs and figure out what solves them
Truenas is completely unnecessary, it just brings overhead and complexity. You are good with your setup.
I would separate the media and the Jellyfin image into different pools. Media would be a normal ZFS pool full of media files that gets mounted into any VM that needs it, like Jellyfin, sonarr, radarr, qbittorrent, etc. (preferably read-only mounted in Jellyfin if you’re going to expose Jellyfin to the internet).
Either create a virtual disk in Proxmox or get a dedicated SATA/SAS card and pass it though to either a NAS OS or Jellyfin.
You’re doing it fine. You can overprovision your zpool that way for other VMs with datasets on the pool, and it only uses what it needs for each set. And you can exclude the media pool from backups and repllications if you like. There’s no performance hit the way you’r doing it.
I sure wouldn’t bother with any sort of NAS intermediary, you can share out the media pool via the Jellyfin VM if you really need to, but I can’t see why you would if you’re using Arr stack components already.
OK, sweet thanks. I just thought having the media files directly in the ZFS pool (zfs pool > files) instead of ZFS Pool > Qemu img > Files would be smarter
Then you’d have to share them back from the host to the guest using NFS or samba, and there’s no reason to have them on the host. No, you’re fine. That’s what I would consider the right way to do it for what you describe as your purpose. Putting more layers in there isn’t serving a useful purpose, which is why I say to not bother with a NAS to store them, if your primary use of them is via the Arr stack VM.