Add a NFS server jail for persistent volumes.

This commit is contained in:
Tom Alexander 2023-06-22 13:28:12 -04:00
parent ab48b1e01f
commit 8346065c6f
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 23 additions and 0 deletions

View File

@ -31,6 +31,15 @@ jail_list:
enabled: true
conf:
src: public_dns
- name: persistent_volume
enabled: true
conf:
src: persistent_volume
persist:
- name: volumes
mount: /volumes
# properties:
# recordsize: "8192"
bhyve_dataset: zdata/vm
bhyve_canmount: "on"
# efi_dev: /dev/gpt/EFI

View File

@ -0,0 +1,14 @@
persistent_volume {
path = "/jail/main/jails/${name}";
vnet;
exec.prestart += "/usr/local/bin/jail_netgraph_bridge start jail_nat jail${name} 10.215.1.1/24";
exec.poststop += "/usr/local/bin/jail_netgraph_bridge stop jail_nat jail${name}";
vnet.interface += "jail${name}";
devfs_ruleset = 14;
mount.devfs;
exec.start += "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown jail";
exec.consolelog = "/var/log/jail_${name}_console.log";
}