Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.4

Exit Print View

Updated: July 2019
 
 

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}/rpool directory.

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

$ zfs create -V 5gb system1/vol

Be careful when changing the size of the volume. For example, if the size of the volume shrinks, data corruption might occur. 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. Thus, when you create a volume, a reservation is automatically set to the initial size of the volume to ensure data integrity.

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

$ zfs get all system1/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 system1/vol
system1/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 an Oracle Solaris system with zones installed, you cannot create or clone a ZFS volume in a native zone.