I have a Jail managed ZFS dataset that works great from the command line.
However, upon booting the jail, i have an rc.d script that runs a service "env". In that script it needs to mount a zfs dataset. but first it needs to locate the name. I would like to use the "zfs list" command to do this but it throws an error. I've tried sleeping for up to 48 seconds and it seems to me it should respond within that time but it does not.
I have used rcorder to determine that my service is run last, so I can't make it run any later.
I am aware of these settings in rc.conf for networking that allow you to wait for various things to happen:
netwait_enable="YES" # Enable rc.d/netwait to wait for static ip to be up
netwait_ip="x.x.x.x" # Wait for ping response from any IP in this list.
netwait_timeout="10" # Total number of seconds to perform pings.
netwait_if="ngeth0" # Wait for active link on each intf in this list.
netwait_if_timeout="10" # Total number of seconds to monitor link state.
Is there something similar for mounts? Actually, that might not help. It is likely the dataset is mounted by this point. It is just that zfs list is not aware of it yet and responds with an error.
If anyone has any advice I would appreciate it. Thank you for any help!
However, upon booting the jail, i have an rc.d script that runs a service "env". In that script it needs to mount a zfs dataset. but first it needs to locate the name. I would like to use the "zfs list" command to do this but it throws an error. I've tried sleeping for up to 48 seconds and it seems to me it should respond within that time but it does not.
I have used rcorder to determine that my service is run last, so I can't make it run any later.
I am aware of these settings in rc.conf for networking that allow you to wait for various things to happen:
netwait_enable="YES" # Enable rc.d/netwait to wait for static ip to be up
netwait_ip="x.x.x.x" # Wait for ping response from any IP in this list.
netwait_timeout="10" # Total number of seconds to perform pings.
netwait_if="ngeth0" # Wait for active link on each intf in this list.
netwait_if_timeout="10" # Total number of seconds to monitor link state.
Is there something similar for mounts? Actually, that might not help. It is likely the dataset is mounted by this point. It is just that zfs list is not aware of it yet and responds with an error.
If anyone has any advice I would appreciate it. Thank you for any help!