SAM-QFS 5.0 Planning - Functional (Requirements) Specification Document ======================================================================= Template: /labhome/release/50/docs/requirement.specs/funcl_reqmt_spec_template Updated: 05/22/2008 FEATURE DESCRIPTION: ------------------- 1)Describe the feature or functionality in enough detail for members of the P-Team to understand the feature. Solaris Zones feature has implemented with Solaris 10. This feature allows SAM-QFS to support Solaris Zones. 2)List RFE(s) here (to be used for tracking purposes). 6479500 Support needed for Shared QFS in Solaris non-global zones SCOPE OF THE PROJECT: -------------------- All of the SAM-QFS filesystems mounted on the non-global zones must be mounted on the global zone first, then those filesystems will be mounted on the non-global zones with loopback mount option. All components included in the SUNWsamfsr, SUNWsamfsu, SUNWqfsr and SUNWqfsu are installed in the global zone only, and should not be installed in the non-global zones. SUNW_PKG_ALLZONES, SUNW_PKG_HOLLOW and SUNW_PKG_THISZONE package parameters define the characteristics of packages on a system with zones configured. Some user commands, such as sls(1), stage(1), setfa(1) and etc., and libraries need to be available in the non-global zone where SAM-QFS is loopback mounted. In order to allow users in the non-global zone to access those commands, create a /opt/SUNWsamfs/zone and then link certain zone-aware files from /opt/SUNWsamfs in the global zone, and then have the zone loopback mount on /opt/SUNWsamfs in the non-global zone. Some of those user commands issue a system call thru the /devices/pseudo/samioc@0:syscall so all non-global zones where SAM-QFS are loopback mounted should have this pseudo device. The new admin tool: samzoneops(1M) The new admin configuration file: samzone.conf(4) The new admin tool /opt/SUNWsamfs/sbin/samzoneops has created to allow administrator to easily and automatically configure the SAM-QFS to be loopback mounted in the non-global zone, and this tool also configures /opt/SUNWsamfs and /devices/pseudo/samioc@0:syscall in the non-global zone where SAM-QFS are loopback mounted. The samzoneops(1M) is automatically started by the sam-fsd(1M) when it gets started or 'samd config' has executed, or administarator can manually start the samzoneops(1M) as well. If a samzone.conf(4) configuration file doesn't exist, samzoneops(1M) does nothing. The samzone.conf file defines SAM-QFS to be mounted in designated non-global zones. This configuration file has following format. zone = zonename samfs mountpoint Where zonename is non-global zone name and samfs is family set name of SAM-QFS. samzone.conf(4) example. Following example defines qfs1 is mounted on the /archive/qfs1, qfs2 is mounted on the /backup/qfs2 and sam1 is mounted on the /sam1 in the non-global zone, and sam1 is mounted on the /archive/sam1 in the non-global zone. # Configure zone1 zone = zone1 qfs1 /archive/qfs1 qfs2 /backup/qfs2 sam1 /sam1 # Configure zone2 zone = zone2 sam1 /archive/sam1 samzoneops(1M) issues following /usr/sbin/zonecfg(1M) as a result of an above configuration. Assume, qfs1 is mounted on the /qfs1, qfs2 is mounted on the /qfs2 and sam1 is mounted on the /sam1 in the global zone. zone zone1: > add fs > add dir=/devices/pseudo/samioc@0:syscall > add special=/devices/pseudo/samioc@0:syscall > set type=lofs > end > add fs > add dir=/opt/SUNWsamfs > add special=/opt/SUNWsamfs/zone > set type=lofs > end > add fs > set dir=/archive/qfs1 > set special=/qfs1 > set type=lofs > end > add fs > set dir=/backup/qfs2 > set special=/qfs2 > set type=lofs > end > add fs > set dir=/sam1 > set special=/sam1 > set type=lofs > end zone zone2: > add fs > add dir=/devices/pseudo/samioc@0:syscall > add special=/devices/pseudo/samioc@0:syscall > set type=lofs > end > add fs > add dir=/opt/SUNWsamfs > add special=/opt/SUNWsamfs/zone > set type=lofs > end > add fs > set dir=/archive/sam1 > set special=/sam1 > set type=lofs > end Changes to the sam-fsd: Sam-fsd reads a /etc/opt/SUNWsamfs/samzone.conf file when configuring SAM-QFS at the initialization or 'samd config' has run. When zones need Shared QFS filesystems it is necessary to delay the boot of the zone until after the Shared QFS filesystem has been mounted. Zones which are dependent on Shared QFS filesystems should be marked as autoboot=false, a message will be printed by the sam-fsd to the console to ask administrator to set autoboot=false. The sam-fsd will monitor the status of the Shared QFS filesystems configured in the non-global zones and it will boot a zone when the Shared QFS filesystems it requires become available. The sam-fsd will create a command file to issue 'zoneadm -z boot'. Command changes: ssum(1), request(1) Some of options for those user commands can't use in the non-global zones since access to the raw device is prohibited in the non-global zones. ssum(1) -e option to set data verification is prohibited. request(1) -p option to position the removable media is prohibited Ssum(1) and request(1) commands call getzoneid(3C) to determine command is executed in the non-global zone. The administrative commands such as samu(1M), samd(1M), are not available in the non-global zones since SAM daemons running on the global zones are not visible from the non-global zones. Package script change: preremove script for SUNWsamfsu The preremove script in the SUNWsamfsu package checks if /opt/SUNWsamfs and /devices/pseudo/samioc@0:syscall are created and mounted. If so, the preremove script umounts both two directories to avoid unloading samfs module to fail with busy. FUNCTIONAL REQUIREMENTS: ----------------------- Allow SAM-FS/QFS to support Solaris Zones. To control SUNWsamfsr, SUNWsamfsu, SUNWqfsr and SUNWqfsu are installed in the global zone only, following packaging paramaters are defined. SUNW_PKG_ALLZONES=false, SUNW_PKG_HOLLOW=false and SUNW_PKG_THISZONE=true. DELIVERABLES: ------------ - New command samzoneops - This new tool configures samfs, qfs and the sam systemcall device node and /opt/SUNWsamfs in the non-global zone. This command requires a command file created by the sam-fsd or manually edited. - New config file samzone.conf - Defines samfs or qfs to be mounted in the designated non-global zone. - Source files: Base:/labhome/kenk/zone/bld3/5.0 include/sam/names.h pkg/GNUmakefile pkg/checkinstall_raw pkg/preremoveu pkg/samproto pkg/samprotou src/catalog.msg src/cmd/gencmd/gencmd.c src/cmd/request/request.c src/fs/fsd/GNUmakefile src/fs/fsd/fsd.c src/fs/fsd/zone.c src/fs/fsd/fsd.h src/fs/fsd/samzoneops DOCUMENTATION IMPACT: -------------------- The changes to sam-fsd(1M) needs to be documented. The new admin tool samzoneops(1M) needs to be documented. The new configuration file samzone.conf(4) needs to be documented. Manpage for ssum(1) and request(1) need to be updated. The filesystem administrator's guide should include a section on how to configure SAM-FS/QFS on the Solaris Zones. TESTING: ------- A complete regression test cycle is needed on the global zone, and all user commands such as stage(1), archivie(1) and etc. must be tested on the non-global zones.