Jellyfin Forum
NFS/SMB SHARE - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: General Discussion (https://forum.jellyfin.org/f-general-discussion)
+--- Thread: NFS/SMB SHARE (/t-nfs-smb-share)



NFS/SMB SHARE - iNiKKo - 2024-04-26

Hello, today one of my hard-drive failed and i lost 1tb of data,
So i decided to use my second serverĀ  as a Raid / Storage area, now the obvious problem is how do i share it to my other server that is hosting jellyfin?

I have read that Jellyfin has to have the storage mounted but in my scenario thats not possible.

[explanation, SERVER 1 is strong and a small pc that can hold 1 hdd, SERVER 2 is slow but it can hold 3 HDD's
i can only run jellyfin on SERVER 1 which means i wont have RAID and small amount of storage, so i need to be able to use both servers with jellyfin]


Anyway i can mount RAID SERVER STORAGE to JELLYFIN SERVER?


RE: NFS/SMB SHARE - pixel24 - 2024-04-26

First, let's talk about your hardware setup. I assume Server1 has more than one SATA port on the board, right? It only has one slot for a 3.5" HDD? What is your storage requirement? I would suggest installing two or three large SSDs in Server1 and configuring a software RAID (1 with two SSDs or 5 with three SSDs). Since SSDs are not mechanical, you can secure them inside the case with cable ties or adhesive tape.

If you absolutely need to use Server2, you can't simply connect a RAID to Server1. Instead, you need to set up a file server (SMB or NFS) on Server2 and create a share. This share will then be mounted on Server1.


RE: NFS/SMB SHARE - bitmap - 2024-04-26

"Mounted" does not mean literally mounted to the hardware. It can be a software mount (i.e., NFS or Samba as @pixel24 states). Depending on your OS(s) this is fairly straightforward. Linux is where I live, so that's what I can describe. Decide on where things will be mounted on the host (housing the drives), decide where everything is mounted on the client (consuming data from the host), install the proper software (nfs-common, nfs-kernel-server), configure the exports on the host (/etc/exports), configure the NFS mounts on the client (/etc/fstab). Last step is to mount the drives on the client (mount -a should work, will require sudo).

Permissions, mount locations, whether to squash access, options like sync and subtree check are the more difficult part. Here's an example of exports and fstab. Access is squashed to the user on the host that has general permissions to all files concerned (GID=998, UID=1000).

Code:
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#

/mnt/media/core 192.168.x.y(rw,sync,no_subtree_check,anonuid=1000,anongid=998)
/mnt/media/extra    192.168.x.y(rw,sync,no_subtree_check,anonuid=1000,anongid=998)
/mnt/media/multi        192.168.x.y(rw,sync,no_subtree_check,anonuid=1000,anongid=998)
/mnt/backup/multi       192.168.x.y(rw,sync,no_subtree_check,anonuid=1000,anongid=998)
/mnt/backup/tv-flux     192.168.x.y(rw,sync,no_subtree_check,anonuid=1000,anongid=998)

Code:
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during curtin installation
UUID=abc-def-ghi-jkl-mnop / ext4 defaults 0 1
/swap.img       none    swap    sw      0       0

/dev/disk/by-uuid/qrs-tuv-wxy-zab-cdef  /mnt/media/core ext4    defaults        0       0
/dev/disk/by-uuid/ghi-jkl-mno-pqr-stuv  /mnt/media/extra    ext4    defaults        0       0
/dev/disk/by-uuid/wxy-zab-cde-fgh-ijkl  /mnt/media/multi        ext4    defaults        0       0
/dev/disk/by-uuid/mno-pqr-stu-vwx-yzab  /mnt/backup/multi       ext4    defaults        0       0
/dev/disk/by-uuid/cde-fgh-ijk-lmn-opqr  /mnt/backup/tv-flux     ext4    defaults        0       0

192.168.x.y:/mnt/media/flux     /mnt/media/flux nfs     defaults        0       0
192.168.x.y:/mnt/media/4K       /mnt/media/4K   nfs     defaults        0       0
192.168.x.y:/mnt/backup/critical        /mnt/backup/critical    nfs     defaults        0       0