SOLVED iSCSI initiator from plex plugin jail

a12

Cadet
Joined
Oct 18, 2021
Messages
8
Hi all!

I have enabled the following on both my jail and system tunables:
  • devfs_ruleset=0
  • securelevel=0
  • allow_mount=1
  • allow_mount_devfs=1
  • allow_mount_procfs=1

  • security.jail.enforce_statfs: 0
  • security.jail.mount_allowed: 1
  • security.jail.mount_devfs_allowed: 1
  • security.jail.mount_procfs_allowed: 1
Since adding this config, I am able to now see other folders in dev, however the iscsi folder is still greyed out as per below:
1634559363993.png


1634559239692.png


Am I missing something as to why the iSCSi does not allow me to point my libraries to this location?
 

Attachments

  • 1634559288601.png
    1634559288601.png
    22.6 KB · Views: 103

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't understand what you think you'll get by doing that, but it seems to me that it would be a permissions issue... what account (and specifically UID) is your plex daemon running as in the jail?
 

a12

Cadet
Joined
Oct 18, 2021
Messages
8
All of my storage is currently presented using ISCSI to windows so the plan was to stop presenting this to the windows server and move it so plex and storage are all on one box rather to plex hosted on a windows vm.

Jail is running as root so wouldn't have expected this to be the issue:

1634572983778.png


Also seems that plex is unable to read from the zfs vol as I get the same problem with the options being greyed out.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Mounts can't be changed while the jail is running. Stop the jail, and those options will become available.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It's a zvol, so it won't work. You need a dataset to do a nullfs mount to a jail. Forget iSCSI as a method of shafting into a jail.
 

a12

Cadet
Joined
Oct 18, 2021
Messages
8
Thanks, could you please advise the best way to present my Zvols into Plex?
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Thanks, could you please advise the best way to present my Zvols into Plex?
You can't. Use Windows to copy the indvidual files into a filesystem shared via SMB and then mount that into the Plex jail. You cannot mount a Zvol into a jail.
 
  • Like
Reactions: a12

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

a12

Cadet
Joined
Oct 18, 2021
Messages
8
Well, you sort-of can...

Create a VM and present that zvol to it as a disk. Run plex on that VM.

If you want to run plex as a jail and have the storage coming from a zvol directly, as @Patrick M. Hausen said, you can't.
So next best thing to keep things lightweight...
- run Plex in a jail using plugins
- share this using smb (to load files to it, copy them via a windows machine)
- present the smb to the Plex jail?

Thanks for all your help here!
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
- share this using smb (to load files to it, copy them via a windows machine)
No need to share.

- present the smb to the Plex jail?
You mount the storage directly to the jail using a nullfs mount (either with the GUI - Jail | Mount Points, or from CLI with iocage fstab jailname -a /mnt/tank/data /mnt/data nullfs rw 0 0)
 

a12

Cadet
Joined
Oct 18, 2021
Messages
8
No need to share.


You mount the storage directly to the jail using a nullfs mount (either with the GUI - Jail | Mount Points, or from CLI with iocage fstab jailname -a /mnt/tank/data /mnt/data nullfs rw 0 0)
Thanks - sorry - total noob here when it comes to this sort of stuff.

The problem I have with using a mount point is that within Pool 1 are my 2 zfs vols - it doesn't give me the option to use these as source points.

When I select Pool1 root, the jail won't start, am I doing something wrong?


1634806508917.png
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
The problem I have with using a mount point is that within Pool 1 are my 2 zfs vols - it doesn't give me the option to use these as source points.
Which is why you need to copy the data to dataset(s), then you can mount them to a jail.

If you don't want to/can't do that, you'll need to have a VM that mounts the ZVOL and shares it out... but then it would make more sense to run plex in that VM.
 
  • Like
Reactions: a12

a12

Cadet
Joined
Oct 18, 2021
Messages
8
Which is why you need to copy the data to dataset(s), then you can mount them to a jail.

If you don't want to/can't do that, you'll need to have a VM that mounts the ZVOL and shares it out... but then it would make more sense to run plex in that VM.
Great! I will attempt to copy the data to the dataset pool1 - thank you for all your help :D
 

a12

Cadet
Joined
Oct 18, 2021
Messages
8
Now onto a similar problem.... added a dataset (Plex-Movies-Copy) and within that dataset, created a zvol (as this is how I understood I would create a mnt point for plex).... mount point source of the dataset.........It doesn't seem to show?

mnt point:
1634815379041.png


folder on Plex:

1634815399175.png
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, you just mount the dataset. Zvols are not where you store files. They are "virtual disks" that you can only serve via iSCSI or inside virtual machines as disk devices.

You need
  • a dataset - the source
  • an empty directory inside the jail - the destination
That's all as far as the jail is concerned.

To copy files over via Windows you need to share source dataset with SMB. Any file you put in the dataset will show up in the jail at the destination mount point.
 
  • Like
Reactions: a12

a12

Cadet
Joined
Oct 18, 2021
Messages
8
No, you just mount the dataset. Zvols are not where you store files. They are "virtual disks" that you can only serve via iSCSI or inside virtual machines as disk devices.

You need
  • a dataset - the source
  • an empty directory inside the jail - the destination
That's all as far as the jail is concerned.

To copy files over via Windows you need to share source dataset with SMB. Any file you put in the dataset will show up in the jail at the destination mount point.
Thank you! Finally managed to get it working and works flawlessly. Sorry for the dumb questions along the way and thanks for everybody's support!!
 
Top