HomeFreeBSD

Make zfs-share service resilient to stale exports

Description

Make zfs-share service resilient to stale exports

The are a few cases where stale entries in /etc/exports.d/zfs.exports
will cause the nfs-server service to fail when starting up.

Since the nfs-server startup consumes /etc/exports.d/zfs.exports, the
zfs-share service (which rebuilds the list of zfs exports) should run
before the nfs-server service.

To make the zfs-share service resilient to stale exports, this change
truncates the zfs config file as part of the zfs share -a operation.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Don Brady <don.brady@delphix.com>
Closes #13775

Details

Provenance
Don Brady <don.brady@delphix.com>Authored on Sep 9 2022, 5:54 PM
GitHub <noreply@github.com>Committed on Sep 9 2022, 5:54 PM
Parents
rG60d995727a19: FreeBSD: Replace legacy make_dev() interface usage
Branches
Unknown
Tags
Unknown