Problem statement: The NFS client and server currently store their properties in /etc/default/nfs, which is deprecated in favor of SMF properties. This will complicate any NFS project which needs to add an NFS property. This is a proposal to solve this problem. We propose to convert /etc/default/autofs to SMF properties at the same time. Solution: The properties from /etc/default/nfs will be split among the svc:/network/nfs/* services, as shown below. sharectl(1M) and libshare will be modified to get and set properties in SMF instead of using /etc/default/nfs. A packaging script will be written to convert existing properties in /etc/default/nfs to SMF properties on upgrade, and BFU will be modified to match. The sysidnfs4 tool will be taught to play properly with this also. The current NFS properties are: NFSD_MAX_CONNECTIONS=, default unlimited NFSD_LISTEN_BACKLOG=, default 32 NFSD_PROTOCOL=, default ALL, can't be set with NFSD_DEVICE NFSD_DEVICE=, default not set, can't be set with NFSD_PROTOCOL NFSD_SERVERS=, default 16 LOCKD_LISTEN_BACKLOG=, default 32 LOCKD_SERVERS=, default 20 LOCKD_RETRANSMIT_TIMEOUT=, default 5 GRACE_PERIOD=, default 90 LOCKD_GRACE_PERIOD=, default 90 (deprecated) NFS_SERVER_VERSMIN=, default 2 NFS_SERVER_VERSMAX=, default 4 NFS_CLIENT_VERSMIN=, default 2 NFS_CLIENT_VERSMAX=, default 4 NFS_SERVER_DELEGATION=, default on NFSMAPID_DOMAIN=, default none ! NB: the mappings below have been changed to match what sharectl(1M) ! currently supports, since maintaining the current sharectl(1M) name ! while using more regular SMF property names is not useful. Changes ! from the original spec are marked with a '!' at the start of the line. These should be split up and mapped as follows: svc:/network/nfs/server properties: Setting Property NFSD_MAX_CONNECTIONS application/max_connections astring "" NFSD_LISTEN_BACKLOG application/listen_backlog astring 32 ! NFSD_PROTOCOL application/protocol astring ALL ! NFSD_DEVICE application/device astring "" ! NFSD_SERVERS application/servers astring 16 ! NFS_SERVER_VERSMIN application/server_versmin astring 2 ! NFS_SERVER_VERSMAX application/server_versmax astring 4 ! NFS_SERVER_DELEGATION application/server_delegation astring on svc:/network/nfs/nlockmgr properties: ! LOCKD_LISTEN_BACKLOG application/lockd_listen_backlog astring 32 ! LOCKD_SERVERS application/lockd_servers astring 20 ! LOCKD_RETRANSMIT_TIMEOUT application/lockd_retransmit_timeout astring 5 GRACE_PERIOD application/grace_period astring 90 Note: if a customer has set LOCKD_GRACE_PERIOD and not GRACE_PERIOD, application/grace_period will take its value; the intent is to fold these into one SMF setting to reduce confusion. svc:/network/nfs/client properties: ! NFS_CLIENT_VERSMIN application/client_versmin astring 2 ! NFS_CLIENT_VERSMAX application/client_versmax astring 4 svc:/network/nfs/mapid properties: ! NFSMAPID_DOMAIN application/nfsmapid_domain astring "" The properties from /etc/default/autofs will be converted to SMF properties in the svc:/system/filesystem/autofs service. sharectl(1M) and libshare will be extended with an autofs plugin to make 'sharectl {get,set} autofs' work with SMF. A packaging script will be written to convert existing properties in /etc/default/autofs to SMF properties on upgrade, and BFU will be modified to match. The current autofs properties are: AUTOMOUNT_TIMEOUT=, timeout in seconds, default 600 AUTOMOUNT_VERBOSE=, trace level, default 0 AUTOMOUNTD_ENV=, environment variables, default "" These map as follows to properties in svc:/system/filesystem/autofs: AUTOMOUNT_TIMEOUT application/timeout astring 600 AUTOMOUNT_VERBOSE application/automount_verbose astring false AUTOMOUNTD_VERBOSE application/automountd_verbose astring false AUTOMOUNTD_NOBROWSE application/nobrowse astring false AUTOMOUNTD_TRACE application/trace astring 0 AUTOMOUNTD_ENV application/environment astring "" The Committed sharectl(1M) interface for autofs will use the same names as for the SMF properties. Development plan: We will start by making the NFS and autofs components consult SMF instead of using defopen()/defread(), and will test this with manually-created SMF property properties. We will then teach libshare_nfs.so to use the SMF as the repository for get/set operations, rather than /etc/default/*; an example of this has been done for the CIFS client. Property manipulation is currently table-driven, so we will add knowledge of the SMF service in which a property lives to the tables. A new libshare_autofs.so will be provided to do the same for autofs. The SMF team has written an postinstall script which converts an /etc/default/* file into new service properties via commands in the /var/svc/profile/upgrade file. We will extend this work for /etc/default/nfs to handle putting properties into multiple services, and use a simpler script for /etc/default/autofs. We may do this via the existing 'defnfs' class-action script rather than a postinstall script. The script will also replace the old /etc/default file with a document describing how properties should be managed with SMF. PSARC 1999/606 introduced this file, and noted that its contents were Unstable (i.e. Uncommitted), so this change is permitted in a Minor release, at least in theory. Summary of interface changes: ! - The SMF property names will be a Project Private interface ! - The sharectl(1M) get/set interfaces for the NFS protocol will be ! Committed as the preferred way to manipulate NFS properties. - libshare_nfs.so (Consolidation Private) will be modified to use SMF as a back-end for properties - libshare_autofs.so (Consolidation Private) will be created to use SMF as a back-end for properties - SUNWnfscr will be modified to convert from /etc/default/nfs to SMF - SUNWatfsr will be modified to convert from /etc/default/autofs to SMF - sysidnfs4 in the install consolidation will be changed to set SMF properties instead of /etc/default/nfs Doc changes: We will engage doc writers to modify the Systems Administration Guide, and other Docs where necessary. Bugs will be filed to change the following man pages: - automount(1M) - automountd(1M) - lockd(1M) - mount_nfs(1M) - nfsd(1M) - nfsmapid(1M) - sharectl(1M) - autofs(4) - nfs(4) Related work: What does (or will) the CIFS stuff do? The CIFS server team is currently implementing a libshare_smb.so plugin to use SMF to store server configuration parameters; they will never ! have them in a flat file as they did in Montana. As is the case here, ! all properties are stored as astrings in SMF. The CIFS client team has independantly created a libshare_smb.so plugin to handle CIFS client settings by referring to the CIFS server work; attention has been paid to make sure they will merge together well.