内に含まその他のドキュメントサポート リソース | PDF 文書ファイルをダウンロードする (1709 KB)
Creating a ZFS File System HierarchyAfter creating a storage pool to store your data, you can create your file system hierarchy. Hierarchies are simple yet powerful mechanisms for organizing information. They are also very familiar to anyone who has used a file system. ZFS allows file systems to be organized into arbitrary hierarchies, where each file system has only a single parent. The root of the hierarchy is always the pool name. ZFS leverages this hierarchy by supporting property inheritance so that common properties can be set quickly and easily on entire trees of file systems.
|
# zfs create tank/home |
Next, individual file systems are grouped under the home file system in the pool tank.
Set the inherited properties.
After the file system hierarchy is established, set up any properties that should be shared among all users:
# zfs set mountpoint=/export/zfs tank/home # zfs set sharenfs=on tank/home # zfs set compression=on tank/home # zfs get compression tank/home NAME PROPERTY VALUE SOURCE tank/home compression on local |
A new feature is available that enables you to set file system properties when the file system is created. For example:
# zfs create -o mountpoint=/export/zfs -o sharenfs=on -o compression=on tank/home |
For more information about properties and property inheritance, see Introducing ZFS Properties.
Create the individual file systems.
Note that the file systems could have been created and then the properties could have been changed at the home level. All properties can be changed dynamically while file systems are in use.
# zfs create tank/home/bonwick # zfs create tank/home/billm |
These file systems inherit their property settings from their parent, so they are automatically mounted at /export/zfs/user and are NFS shared. You do not need to edit the /etc/vfstab or /etc/dfs/dfstab file.
For more information about creating file systems, see Creating a ZFS File System.
For more information about mounting and sharing file systems, see Mounting and Sharing ZFS File Systems.
Set the file system-specific properties.
In this example, user bonwick is assigned a quota of 10 Gbytes. This property places a limit on the amount of space he can consume, regardless of how much space is available in the pool.
# zfs set quota=10G tank/home/bonwick |
View the results.
View available file system information by using the zfs list command:
# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 92.0K 67.0G 9.5K /tank tank/home 24.0K 67.0G 8K /export/zfs tank/home/billm 8K 67.0G 8K /export/zfs/billm tank/home/bonwick 8K 10.0G 8K /export/zfs/bonwick |
Note that the user bonwick only has 10 Gbytes of space available, while the user billm can use the full pool (67 Gbytes).
For more information about viewing file system status, see Querying ZFS File System Information.
For more information about how space is used and calculated, see ZFS Space Accounting.