datasets - Oracle Solaris ZFS dataset organization
Oracle Solaris is installed to a hierarchical set of ZFS datasets with well-defined names. The ZFS datasets, composed of both file systems and volumes, are stored on a bootable ZFS storage pool in the global zone. Snapshots are also ZFS datasets, but will not be discussed here.
The datasets are created automatically by one of the installation tools: the automated installer, the text installer, or the GUI installer. For non-global zones, the datasets are created by the zone brand during the zone installation and might differ from the hierarchy described here, which applies to the solaris(5) brand and the global zone.
rpool is the default name of the top-level dataset in the bootable ZFS storage pool and is mounted at /rpool. Bootable ZFS storage pools have certain restrictions over normal ZFS storage pools. These restrictions are discussed in the “Oracle Solaris Administration: ZFS File Systems” section of the Oracle Solaris 11 Information Library.
Administrators can create datasets anywhere beneath the top-level dataset, but those created within the 'ROOT/be-<name>' dataset are treated specially by beadm(1M) and are discussed later.
This is a container dataset which is not mounted by Solaris during operation. It collects sets of related datasets, each set forming a ZFS Boot Environment (BE). A BE is created on installation. Additional BEs are created by pkg(1) and can be modified, created, or destroyed by beadm.
In the global zone, the ROOT dataset must be stored within a bootable ZFS storage pool, called 'rpool' by default. For non-global zones, the ROOT dataset is stored in a dataset with the leaf name 'rpool' beneath the zonepath of each zone.
The list below shows the datasets that are created beneath the ROOT dataset. This list uses the default storage pool name.
This is the default dataset that is created for the first boot environment installed on the system. It contains the root file system and is mounted on '/'.
The name of the leaf component of this dataset corresponds to the name of the BE that is associated with it. Any datasets created by the administrator as children of the 'ROOT/<be-name>' dataset will be associated with that BE, and will be created, cloned, destroyed and have snapshots taken of them as part of the BE by beadm. New datasets created beneath 'ROOT/<be-name>' should have the zfs property 'canmount=noauto' set so that the datasets are mounted by beadm when appropriate.
All packaged content that is part of the image in a boot environment must fully reside within the datasets belonging to the boot environment.
This is a dataset associated with each boot environment that contains the /var file system for the BE.
rpool/dump is a ZFS volume created during installation and is used as the default dump device for the system crash dump facility. This dataset is shared across all BEs. The crash dump facility can be managed with dumpadm(1M) and the dump device can be resized using zfs(1M). The rpool/dump dataset is not present on non-global zones. Other devices can be used instead of rpool/dump.
rpool/swap is a ZFS zvol created during installation and is used as the default swap area for the system. This dataset is shared across all BEs. Use swap(1M) to add or remove swap volumes. Use zfs to resize swap volumes. The rpool/swap dataset is not present on non-global zones. Other swap volumes can be used instead, as well as rpool/swap.
rpool/VARSHARE is a dataset created on installation or upgrade, and is not part of any one BE. Instead, it is shared across all BEs and is mounted automatically by that BE during boot. It contains unpackaged content from /var. For example, audit information is stored in /var/audit, core files are stored in /var/cores, saved crash dumps are stored in /var/crash, and system mail is stored in /var/mail.
rpool/VARSHARE is reserved for use by Oracle Solaris. Creating datasets beneath rpool/VARSHARE is not supported.
rpool/VARSHARE/zones is a dataset associated with each boot environment which is mounted at /system/zones and is the default parent of zonepath datasets.
rpool/export/home is a dataset created on installation which can be used for user home directories. It is the default location for user home directories if the -d option is not passed to useradd(1M) to specify a different directory. If the user home directory does not already exist and the parent directory is the mount point of a ZFS dataset (for example, rpool/export/home), then a child of that dataset will be created and mounted at the specified location. These datasets are shared across all BEs.