filesystem - file system organization
The file system is a hierarchical structure of descendent file systems and directories that are used to organize system-related components and binaries as well as non-system-related components and home directories in the Oracle Solaris OS. By default, the root file system is installed within a ZFS root pool and specifically, is a ZFS file system with separate directories of system-related components, such as etc, usr, and var, that must be available for the system to function correctly. After a system is installed, the root of the Solaris file system is mounted, which means files and directories are accessible.
All subdirectories of the root file system that are part of the Oracle Solaris OS, with the exception of /var, must be contained in the same file system as the root file system. In addition, all packaged software must reside in the root pool, with the exception of the swap and dump devices. A default swap device and dump device are created automatically as ZFS volumes in the root pool when a system is installed.
The following file system content descriptions make use of platform, platform-dependent, platform-independent, and platform-specific terms. Platform refers to a system's Instruction Set Architecture or processor type as returned by the uname -i command. Platform-dependent refers to a file that is installed on all platforms and whose contents vary depending on the platform. Like a platform-dependent file, a platform-independent file is installed on all platforms. However, the contents of the latter type remains the same on all platforms. An example of a platform-dependent file is compiled, executable program. An example of a platform-independent file is a standard configuration file, such as /etc/hosts. Unlike a platform-dependent or a platform-independent file, the platform-specific file is installed only on a subset of supported platforms. Most platform-specific files are gathered under /platform and /usr/platform.
The root file system contains files and directories that are critical for system operation, such as the kernel, the device drivers, and the programs used to boot the system. These components are described below. The root (/) directory also contains mount point directories where local and remote file systems can be attached to the file system hierarchy.
Root directory of the entire file system name space. This is a special file system that is mounted by the kernel at system boot time.
Directory that contains files and executables that are needed for booting the system.
Symbolic link to the /usr/bin directory that contains system executables and scripts.
Directory that contains special device files. Typically, device files are built to match the kernel and hardware configuration of the system.
Mount point directory for the devfs file system that manages the device name space.
Directory that contains platform-dependent administrative and configuration files and databases that are not shared among systems. This directory defines the system's identity. An approved installation location for bundled Solaris software.
Directory or file system mount point for user home directories, which store user files. By default, the /home directory is an automounted file system.
Directory of platform-dependent loadable kernel modules required as part of the boot process. It includes the generic part of the core kernel that is platform-independent, /kernel/genunix . See kernel(8). An approved installation location for bundled Oracle Solaris software and for add-on system software.
Directory that contains core system libraries. Historically, this directory contained essential library components for system startup.
Directory for accessing removable media that is automatically mounted.
Default temporary mount point directory for file systems. This empty directory is used to temporarily mount a file system.
Temporary mount point directory for file systems that are mounted by the automounter.
Directory for unbundled application packages.
Directory of platform-specific objects that need to reside in the root file system. It contains a series of directories, one per supported platform. The semantics of the series of directories is equivalent to / (root).
Mount point directory for the process file system.
Home directory for the root user.
Mount point directory for the ZFS boot-related components. By default, the root pool is named rpool during installation.
Symbolic link to the /usr/sbin directory.
Mount point directory for the contract (CTFS) and object (OBJFS) file systems.
Directory that is shared across several boot environments, and is resident on a separate dataset beneath the zpool containing boot environments. This is the default parent of zonepaths.
Directory that contains temporary files that are removed during a boot operation.
Directory that contains platform-dependent and platform-independent binaries and files. The /usr/share subdirectory contains platform-independent files. The rest of the /usr directory contains platform-dependent files.
Directory that contains platform-dependent, user-invoked executables. These are commands that users expect to be run as part of their normal $PATH. An approved installation location for bundled Oracle Solaris software. The analogous location for unbundled system software or for applications is /opt/packagename/bin .
Directory that augments the contents of /lib with additional system libraries, and other supporting files that are required by programs at runtime.
Directory that contains Java files and executables.
Contains essential executables used in the booting process and in manual system recovery. Historically, this directory was needed to recover the system before the /usr file system was mounted. In this Oracle Solaris release, /usr is a directory, not a separate file system and is available when the root file system is mounted.
Directory or file system that contains varying files that are unique to a system but can grow to an arbitrary or variable size. An example is a log file. An approved installation location for bundled Oracle Solaris software.
State information for the logadm service, particularly timestamps for last rotation.
Directory that is shared across several boot environments, and is resident on a separate dataset beneath the zpool containing boot environments. Packages should not deliver content here, since package metadata in a given boot environment may not reflect the current content of /var/share.
Packages may deliver directories to /var/.migrate, which will be created automatically beneath /var/share during boot. See pkg(7) and the IPS Developer's Guide for a description of how to share data across boot environments.
By default, the following directories are shared:
/var/share/audit /var/share/cores /var/share/crash /var/share/mail
Symlinks are delivered to /var to point to each shared directory.
If existing datasets attempt to mount on one of those symlinks (for example, users with an existing dataset that normally mounts on /var/mail), then those datasets will be mounted beneath /var/share, since filesystem mounts traverse symlinks. The dataset will still be accessible through the original mountpoint.
Directory that contains files that vary in size or presence during normal system operations. The content of this directory is not removed during a boot operation. It is possible to change the default behavior for /var/tmp to clear all of the files except editor temporary files by setting the clean_vartmp property value of the rmtmpfiles service. This is done with the following commands:
# svccfg -s svc:/system/rmtmpfiles setprop\ options/clean_vartmp = "true" # svcadm refresh svc:/system/rmtmpfiles:default
The solaris.smf.value.rmtmpfiles authorization is required to modify this property.
Directory that is shared across several boot environments and a separate file system.
isainfo(1), svcs(1), uname(1), mount(2), ctfs(4FS), devfs(4FS), objfs(4FS), Intro(5), proc(5), automount(8), automountd(8), boot(8), init(8), kernel(8), mount(8), svcadm(8), svccfg(8), zfs(8), zpool(8)