SAM-QFS x.x Integration with SMF SAM-QFS x.x Planning - Functional (Requirements) Specification Document ======================================================================= Updated: 03/27/2008 FEATURE DESCRIPTION: ------------------- sam-fsd is the daemon that manages SAM-QFS configuration, and a variety of other SAM-QFS daemons. Starting and re-starting sam-fsd is currently done by init via a configured entry in the file /etc/inittab. This feature changes the sam-fsd start/re-start method on Solaris 10 and later hosts, such that it is managed by SMF only. On Linux client hosts, sam-fsd start/re-start will remain managed by init. Shared QFS file systems that are mounted at boot time via /etc/vstab require that the loopback and physical network be available. This is currently managed by the init rc script S73samfs.shared. This feature will replace that rc script with a new service, qfs/svc-shared-mount, that is started via SMF. The svc-shared-mount service will analyze the file /etc/vfstab and mount all shared QFS file systems that are marked for mounting at boot time. SAM-QFS project resource constraints require that SMF management of other SAM-QFS daemons, divorced of sam-fsd, must be deferred to a later release. None of those daemons currently depend on init for start/re-start. RFE 6557716 - Provide SMF Support in QFS SCOPE OF THE PROJECT: -------------------- The management capabilities provided by this feature will be supported on all hardware and software configurations that will be supported by BOTH SAM-QFS and SMF at the time of release. This project involves the following tasks: - Create sam-fsd service manifest. - Create sam-fsd service script. - Create a shared QFS filesystem service manifest to control mounting at boot time. - Create a shared QFS filesystem service script to manage mounting at boot time via /etc/vfstab. - Update Solaris SAM-QFS package management files to install/remove new service manifests and scripts. - Update Solaris SAM-QFS post- and pre-install pkg scripts to disable pre-existing /etc/inittab behavior in favor of the new SMF behavior. - Update sam-fsd daemon to configure the sam-fsd service (Solaris 10 and later only). Add a new sam-fsd -D option to be used for starting sam-fsd as a daemon to avoid non-init-process confusion with historic sam-fsd administrative invocation as a configuration validation tool. Add new sam-fsd -N to be used for determining whether any SAM-QFS file systems are successfully configured. SMF management of SAM is outside the scope of this feature. FUNCTIONAL REQUIREMENTS: ----------------------- The system/sam-fsd Service: The sam-fsd daemon is initially invoked upon the first file system relevant operation after SAM-QFS package installation. It is invoked with the -C (SAM-QFS configuration) option, which currently configures all SAM-QFS file systems and places a sam-fsd respawn entry in the file /etc/inittab and signals init to rescan. That behavior will be updated for Solaris 10 and later hosts so that sam-fsd -C will configure all SAM-QFS file systems as usual but, instead of updating /etc/inittab, it will invoke svcadm to enable the new sam-fsd service. The SAM-QFS pkgadd scripts SUNWsamfsu and SUNWqfsu will be updated to install the sam-fsd service manifest, system/sam-fsd.xml, and service script, svc-sam-fsd. The sam-fsd service script will use a new SAM-QFS query option, sam-fsd -N, to determine if any SAM-QFS file systems have been configured and, if any, will start the sam-fsd daemon using the new sam-fsd -D option. The -N option causes sam-fsd to exit with a non-zero exit code that reflects if any SAM-QFS file systems have been configured. The reason for the new sam-fsd -D option is that, when it was managed only by init, sam-fsd determined that it was started by "the system" and should run as a daemon only when it's parent was process ID 1. Otherwise, it concluded that it was invoked by an administrative user (i.e. root) only to validate a proposed configuration and exit. Now that sam-fsd may be started by "the system" via an SMF-related administrative process (i.e. svc.startd of arbitrary PID running as root) it is impossible for sam-fsd to reliably determine the difference between being started by "the system" vs a root administrator. The new sam-fsd -D option, used by the sam-fsd service script, helps sam-fsd determine that it should run as a daemon. Otherwise, when invoked with no options, it simply validates a proposed configuration and exits as it traditionally has. Adding SMF support will also solidify the order of mount depencies between SAM-QFS file systems and NFS mount points, where the SAM-QFS filesystem must be mounted prior to being exported as an NFS share. On Linux client hosts, non of which support the SMF facility, the sam-fsd daemon will continue to initialize the SAM-QFS configuration via /etc/inittab, and continue to be restarted by init. SMF sam-fsd messages will be written to the SMF log /var/svc/log/system-sam-fsd:default.log A proposed sam-fsd service manifest and script are supplied as attached documents. The network/qfs/shared-mount Service: Shared QFS file systems that are mounted at boot time via /etc/vfstab require that the network be available. This is currently managed by the init rc script S73samfs.shared. This feature replaces that rc script with a new service, network/qfs/svc-shared-mount, that is started via SMF. The SAM-QFS pkgadd scripts SUNWsamfsu and SUNWqfsu will be updated to install the service manifest qfs/shared-mount.xml, and service script svc-qfs-shared-mount. The service manifest places dependencies on the loopback and physical network prior to starting the service script. The svc-qfs-shared-mount service script will parse the file /etc/vfstab and invoke the mount command for each shared QFS file system that is marked for mounting at boot time. For compatibility reasons, the SAM-QFS package install process will continue to install the samfs.shared init script. However that script will be modified to operate meaningfully only on systems that do not support the SMF facility. SMF shared QFS filesystem mount-at-boot messages will be written to the SMF log /var/svc/log/network-qfs-shared-mount:default.log A proposed qfs-shared-mount service manifest and script are supplied as attached documents. Interfaces: The new sam-fsd -D and -N option interfaces are public/stable. The packaging scripts SUNWsamfsu, SUNWqfsu, pkg/postinstall, and pkg/qfsremove are private/volatile. The new SMF manifests and scripts are private/volatile. DELIVERABLES: ------------ - New SMF XML scripts, and SMF configuration updates for SAM-QFS. /var/svc/manifest/system/sam-fsd.xml /var/svc/manifest/network/qfs/shared-mount.xml /lib/svc/method/svc-qfs-shared-mount /lib/svc/method/svc-sam-fsd - Updated SAM-QFS package installation files sam-qfs/pkg/postinstallu sam-qfs/pkg/preremoveu sam-qfs/pkg/qfsproto-sharefs sam-qfs/pkg/qfsprotou sam-qfs/pkg/samproto-sharefs sam-qfs/pkg/samprotou - SAM-QFS infrasructure code updates to support SMF service monitoring and re-start. sam-qfs/src/fs/cmd/mount/mount.c sam-qfs/src/fs/cmd/mount/samfs.shared sam-qfs/src/fs/fsd/fsd.c - Updated sam-fsd man page and other administrative manuals. sam-qfs/src/man/man1m/sam-fsd.1m FUNCTIONAL DEPENDENCIES: ----------------------- None.