can I mount an exfat drive from within a jail?

ragametal

Contributor
Joined
May 4, 2021
Messages
188
please help me understand something.

I want to mount an external harddrive to use it as target for my Truenas backups via Duplicati. the drive is formatted in exfat so it can be read on any other os if i needed to.

My understanding is that Truenas is not compatible with exfat out of the box. It seems this is a limitation of freebsd which is the base os of truenas.

As a solution, i wanted to install the package fusefs-exfat which was ported to freebsd in 2012.

However, a lot of enfasis has been made to the fact that Truenas is an appliance and it is not recomended that i modify its operating system.

The general advisement seems to be that If i need certain package, i should install it inside a jail so it won't affect the Truenas os.

But, again this is my understanding, jails cannot mount drives. Only the host OS can do that.

So, the base os cannot mount the drive because it is not compatible with exfat. The jail would be compatible with exfat but is not allowed to mount drives.

Is this correct?
I hope i am mistaken and would love to be told I'm wrong on this as it appears that truenas has the tools to use exfat drives but it doesn't because....... (insert your speculative theory here).

Please note that I'm not trying to start an argument here of the limitations that Truenas may or may not have. I'm just tring to find a way to mount an exfat drive.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You should be able to find the right devfs_ruleset arrangement to allow direct access from the jail to that device and hence allow fusefs to interact with it directly from inside the jail.

I don't see anything in a cursory search to indicate it's something that people are doing/documenting, but I see no reason why you can't make it work with a bit of research and testing.

Be aware that non-ZFS filesystems will not be able to take advantage of any of the features of ZFS, so TrueNAS will do nothing with that disk in terms of snapshots or replication.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@sretalla , Thank you so much for the reply. This is the first time i hear about devfs ruleset during my research but it does look like that would be my answer.

I am aware of the limitations of exfat but this external usb drive is not intended to be used by the Truenas system directly. Is to be used as a target drive for Duplicaty to make automatic differential backups of the data saved in Truenas. Truenas will have separate mirrored drives that are ZFS that will handle snapshots.

The intent is to have a true backup of my system (because disk redundancy is not a backup and snapshots are not a backup), in a drive that is portable and that I could connect to any computer in case i needed to retrieve the data.

Do you happen to know where can i find more information about them? How to passthru a specific usb drive instead of all the usb devices?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Here's an example I found (with a relatively obvious search string of "devfs_ruleset"):

Seems that guy wanted to access a specific USB printer in a jail.

Because you're wanting access to a disk, you'll probably want to add a rule pointing at something like /dev/ada2 rather than the USB port where it's attached like in the case of the printer.
 

ragametal

Contributor
Joined
May 4, 2021
Messages
188
@sretalla, Lots of good information on that post. Thanks.
 
Top