Difficulty ccessing FreeNAS ZFS snapshots from within a Jail

Status
Not open for further replies.

pwest

Cadet
Joined
May 25, 2015
Messages
3
First, here's what I'm trying to do. I have a FreeNAS 9.3-stable server to which I back up data from from several Linux, mac and windows clients around the house. Using the FreeNAS GUI, I have scheduled ZFS snapshots on my main dataset. I desire to maintain an offsite backup of the NAS, and I want that data to be encrypted. My plan was to install GPG in a jail, and then set up a periodic task in the GPG jail that effectively does an incremental zfs send to a remote host, by piping the output through GPG and then SSH to my remote host. My current status is:
- ZFS snapshots working from FreeNAS
- Commands like 'zfs list -t snapshot' work from the FreeNAS command shell
- Incremental 'zfs send -i' commands working from the FreeNAS command shell
- GPG installed in a jail and working
- FreeNAS dataset source and destination added/configured/mounted in the GPG jail
- GIDs and UIDs set up in the GPG jail to be consistent w/their FreeNAS counterparts
- I can access and see the FreeNAS dataset from the GPG jail command shell
- I can cd to the .zfs directory of interest from the GPG jail command shell and 'see' the snapshots w/ls, cat, etc
- Commands like 'zfs list -t snapshot' DO NOT WORK from within the GPG jail command shell (command result: 'no datasets available')

It seems a bit odd that I can see the actual '.zfs' hidden files from that jail, but that the 'zfs list' and 'zfs send' commands don't work. Should I be able to use and manipulate the zfs snapshots from within the GPG jail? If so, what should I try next? Are some environment variables that need to be set?

Thanks for any pointers/ideas.
-Phil
 

pwest

Cadet
Joined
May 25, 2015
Messages
3
I have been unable to solve this problem, and find it difficult to believe that I'm the only person out there trying to access their zfs snapshots, etc., from a jail... Perhaps I've posted in the wrong forum--any suggestions as to how to get to a solution here would be appreciated.

Thanks,
Phil
 

mjws00

Guru
Joined
Jul 25, 2014
Messages
798
Generally zfs maintenance is done on the host system and only mounted in the jails. On other implementations there are environment variables to set to allow zfs functions within the jail. Unfortunately I have no idea what is implemented in the current template on FN. I have never seen someone attempt your idea, so it isn't surprising that you aren't getting an answer.

You may be able to find the commands to enable this. But traversing a directory does not indicate permission to run zfs commands that affect the host system directly.

Sorry no time to test and break it down further. Could be a simple fix with a variable or locked out by design.
 
Status
Not open for further replies.
Top