Message ID | 20230418093350.4550-1-richard@nod.at (mailing list archive) |
---|---|
Headers | show |
Series | nfs-utils: Improving NFS re-export wrt. crossmnt | expand |
On 4/18/23 5:33 AM, Richard Weinberger wrote: > After a longer hiatus I'm sending the next iteration of my re-export > improvement patch series. While the kernel side is upstream since v6.2, > the nfs-utils parts are still missing. > This patch series aims to solve this. > > The core idea is adding new export option, reeport= > Using reexport= it is possible to mark an export entry in the exports > file explicitly as NFS re-export and select a strategy on how unique > identifiers should be provided. This makes the crossmnt feature work > in the re-export case. > Currently two strategies are supported, "auto-fsidnum" and > "predefined-fsidnum". > > In my earlier series a sqlite database was mandatory to keep track of > generated fsids. > This series follows a different approach, instead of directly using > sqlite in all nfs-utils components (linking libsqlite), a new deamon > manages the database, fsidd. > fsidd offers a simple (but stupid?) text based interface over a unix domain > socket which can be queried by mountd, exportfs, etc. for fsidnums. > The main idea behind fsidd is allowing users to implement their own > fsidd which keeps global state across load balancers. > I'm still not happy with fsidd, there is room for improvement but first > I'd like to know whether you like or hate this approach. > > A typical export entry on a re-exporting server looks like: > /nfs *(rw,no_root_squash,no_subtree_check,crossmnt,reexport=auto-fsidnum) > reexport=auto-fsidnum will automatically assign an fsid= to /nfs and all > uncovered subvolumes. > > Changes since v2, https://lore.kernel.org/linux-nfs/20230404111308.23465-1-richard@nod.at/ > - Split patch series > - Add improved fsidd system unit file > - Rebased to nfs-utils master as of today > - Dropped init code from exportd > > Changes since v1, https://lore.kernel.org/linux-nfs/20220502085045.13038-1-richard@nod.at/ > - Factor out Sqlite and put it into a daemon > - Add fsidd > - Basically re-implemented the patch series > - Lot's of fixes (e.g. nfs v4 root export) > > > Richard Weinberger (8): > Add reexport helper library > Implement reexport= export option > export: Wireup reexport mechanism > export: Uncover NFS subvolume after reboot > exports.man: Document reexport= option > reexport: Add sqlite backend > export: Add fsidd > Add fsid systemd service file > > configure.ac | 1 + > support/Makefile.am | 2 +- > support/export/Makefile.am | 2 + > support/export/cache.c | 74 ++++++- > support/export/export.c | 20 ++ > support/include/nfslib.h | 1 + > support/nfs/Makefile.am | 1 + > support/nfs/exports.c | 62 ++++++ > support/reexport/Makefile.am | 18 ++ > support/reexport/backend_sqlite.c | 267 +++++++++++++++++++++++ > support/reexport/fsidd.c | 198 +++++++++++++++++ > support/reexport/reexport.c | 326 ++++++++++++++++++++++++++++ > support/reexport/reexport.h | 18 ++ > support/reexport/reexport_backend.h | 47 ++++ > systemd/Makefile.am | 5 +- > systemd/fsidd.service | 10 + > utils/exportd/Makefile.am | 4 +- > utils/exportfs/Makefile.am | 3 + > utils/exportfs/exportfs.c | 11 + > utils/exportfs/exports.man | 31 +++ > utils/mount/Makefile.am | 3 +- > utils/mountd/Makefile.am | 2 + > 22 files changed, 1096 insertions(+), 10 deletions(-) > create mode 100644 support/reexport/Makefile.am > create mode 100644 support/reexport/backend_sqlite.c > create mode 100644 support/reexport/fsidd.c > create mode 100644 support/reexport/reexport.c > create mode 100644 support/reexport/reexport.h > create mode 100644 support/reexport/reexport_backend.h > create mode 100644 systemd/fsidd.service > Committed... (tag: nfs-utils-2-6-3-rc9) Thank you! steved.