Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

Using Disks in a ZFS Storage Pool

The most basic element of a storage pool is physical storage. Physical storage can be any block device of at least 128 MB in size. Typically, this device is a hard drive that is visible to the system in the /dev/dsk directory.

A storage device can be a whole disk (c1t0d0) or an individual slice (c0t0d0s7). The recommended mode of operation is to use an entire disk, in which case the disk does not require special formatting. ZFS formats the disk using an EFI label to contain a single, large slice. When used in this way, the partition table that is displayed by the format command appears similar to the following:

Current partition table (original):
Total disk sectors available: 143358287 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
0        usr    wm               256       68.36GB          143358320
1 unassigned    wm                 0           0               0
2 unassigned    wm                 0           0               0
3 unassigned    wm                 0           0               0
4 unassigned    wm                 0           0               0
5 unassigned    wm                 0           0               0
6 unassigned    wm                 0           0               0
8   reserved    wm         143358321        8.00MB          143374704

When Oracle Solaris 11.1 is installed, a EFI (GPT) labeled is applied to root pool disks on an x86 based system in most cases, which looks similar to the following:

Current partition table (original):
Total disk sectors available: 27246525 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector        Size        Last Sector
0  BIOS_boot    wm               256     256.00MB         524543
1        usr    wm            524544      12.74GB         27246558
2 unassigned    wm                 0          0              0
3 unassigned    wm                 0          0              0
4 unassigned    wm                 0          0              0
5 unassigned    wm                 0          0              0
6 unassigned    wm                 0          0              0
8   reserved    wm          27246559       8.00MB         27262942

In the above output, partition 0 (BIOS boot) contains required GPT boot information. Similar to partition 8, it requires no administration and should not be modified. The root file system is contained in partition 1.

A SPARC system with GPT aware firmware has an EFI (GPT) disk label is applied]. For example:

Current partition table (original):
Total disk sectors available: 143358320 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector         Size         Last Sector
0        usr    wm               256       68.36GB          143358320
1 unassigned    wm                 0           0               0
2 unassigned    wm                 0           0               0
3 unassigned    wm                 0           0               0
4 unassigned    wm                 0           0               0
5 unassigned    wm                 0           0               0
6 unassigned    wm                 0           0               0
8   reserved    wm         143358321        8.00MB          143374704

Review the following considerations when using whole disks in your ZFS storage pools:

  • When using a whole disk, the disk is generally named by using the /dev/dsk/cNtNdN naming convention. Some third-party drivers use a different naming convention or place disks in a location other than the /dev/dsk directory. To use these disks, you must manually label the disk and provide a slice to ZFS.

  • On an x86 based system, the disk must have a valid Solaris fdisk partition. For more information about creating or changing a Solaris fdisk partition, see Setting Up Disks for ZFS File Systems in Managing Devices in Oracle Solaris 11.2 .

  • ZFS applies an EFI label when you create a storage pool with whole disks. For more information about EFI labels, see EFI (GPT) Disk Label in Managing Devices in Oracle Solaris 11.2 .

  • The Oracle Solaris installer applies an EFI (GPT) label for the root pool disks on a SPARC based system with GPT aware firmware and on an x86 based system, in most cases. For more information, see Identifying ZFS Root Pool Requirements.

  • For root pool recovery purposes, consider using the archiveadm command to create a root pool archive. Splitting the root pool risks errors because it requires additional manual steps such as setting a new boot device, possibly updating the /etc/vfstab file, and resetting an existing dump device.

    For more information about creating a root pool archive, see Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.2 .

Disks can be specified by using either the full path, such as /dev/dsk/c1t0d0, or a shorthand name that consists of the device name within the /dev/dsk directory, such as c1t0d0. For example, the following are valid disk names:

  • c1t0d0

  • /dev/dsk/c1t0d0

  • /dev/foo/disk