Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014

ZFS Volumes

A ZFS volume is a dataset that represents a block device. ZFS volumes are identified as devices in the /dev/zvol/{dsk,rdsk}/pool directory.

In the following example, a 5-GB ZFS volume, tank/vol, is created:

# zfs create -V 5gb tank/vol

When you create a volume, a reservation is automatically set to the initial size of the volume so that unexpected behavior doesn't occur. For example, if the size of the volume shrinks, data corruption might occur. You must be careful when changing the size of the volume.

In addition, if you create a snapshot of a volume that changes in size, you might introduce inconsistencies if you attempt to roll back the snapshot or create a clone from the snapshot.

For information about file system properties that can be applied to volumes, see Table 5–1.

You can display a ZFS volume's property information by using the zfs get or zfs get all command. For example:

# zfs get all tank/vol

A question mark (?) displayed for volsize in the zfs get output indicates an unknown value because an I/O error occurred. For example:

# zfs get -H volsize tank/vol
tank/vol        volsize ?       local 

An I/O error generally indicates a problem with a pool device. For information about resolving pool device problems, see Identifying Problems With ZFS Storage Pools.

If you are using a Solaris system with zones installed, you cannot create or clone a ZFS volume in a non-global zone. Any attempt to do so will fail. For information about using ZFS volumes in a global zone, see Adding ZFS Volumes to a Non-Global Zone.