FreeNAS Jail - Mount nullfs at jail boot

Status
Not open for further replies.

JavaScriptDude

Dabbler
Joined
Nov 5, 2011
Messages
22
I have a need to mount using nullfs for a jail in FreeNAS and want this mount to be automatically set up at boot of the jail. I have not had luck finding a clean documented way of doing this that worked. I did play around with the fstab under the jails meta folder but no luck that way.

My workaround was to alter a read only script called jail-post-start located under /mnt/<ZVOL>/jails/.<JAIL_ID>.meta and added mount_nullfs ... to the end of this script. This worked for me but as its not documented, I'm not very comfortable with it.

1) What is the proper way of doing this type of mount for a jail so it comes up automatically at boot?
2) Is it ok for users to edit the jail* hook scripts located in the jails meta directory?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
This sounds like you're wanting to add storage to a jail. The manual describes that process using the web GUI. Is that what you're wanting to do?
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,994
This sounds like you're wanting to add storage to a jail. The manual describes that process using the web GUI. Is that what you're wanting to do?
I don't believe that is what the OP is after.

To the OP -- I think that is likely the only way to do it, the way you did. As for this not being documented, that is likely because you are the first person to use it. There is nothing in the GUI that I've seen to make custom changes like this.

Is it safe to do... That depends on who is doing the work. Many people don't have a clue what they are doing so they just botch things up while watching some youtube video. It sounds like you have some clue. The good part here is your actions should be limited to the specific jail ID you are modifying.

I think that if you give us the full picture of what you are doing (within reason), and the full line you are adding into the jail.meta file, if there is another option, someone may be able to lend a helping hand but right now, I don't think there is another option for what you are trying to achieve.

Good Luck!
 
Status
Not open for further replies.
Top