sign in
Home | Updates | Pages | Users | Admin | Help

zfsmanage

Managing ZFS

Creating

# zfs create tank/home
// set some system properties
# zfs create -o atime=off tank/home
# zfs create -o mountpoint=/export/zfs -o sharenfs=on -o compression=on tank/home

List

# 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/someuser      8K 67.0G    8K /export/zfs/someuser
# zfs list tank/home
NAME        USED  AVAIL  REFER  MOUNTPOINT
tank/home    50K  1.95G  25.5K  /tank/home
// display tank/home and all of its descendant datasets
# zfs list -r tank/home
NAME               USED  AVAIL  REFER  MOUNTPOINT
tank/home           50K  1.95G  25.5K  /tank/home
tank/home/someuser  24.5K   200M  24.5K  /tank/home/someuser

ZFS System Properties

# zfs set mountpoint=/export/zfs tank/home
# zfs set sharenfs=on tank/home
# zfs set compression=on tank/home

ZFS User Properties

In addition to the standard native properties, ZFS supports arbitrary user properties. User properties have no effect on ZFS behavior, but you can use them to annotate datasets with information that is meaningful in your environment. Format: module:property

# zfs set dept:users=finance userpool/user1
# zfs set dept:users=general userpool/user2
# zfs get -r dept:users userpool
 AME           PROPERTY   VALUE   SOURCE
userpool       dept:users all     local
userpool/user1 dept:users finance local
userpool/user2 dept:users general local
To clear a user property, use the zfs inherit command. For example:
# zfs inherit -r dept:users userpool
If the property is not defined in any parent dataset, it is removed entirely.

Quotas

# zfs set quota=10G tank/home/someuser

Displaying All ZFS File System Information

# zfs get -s local all

Renaming a ZFS File System

# zfs rename tank/home/someuser tank/home/someuser_old

Create a 100MB file

# mkfile 100m /tank/foo

Destroying a ZFS File System

# zfs destroy tank/home/someuser

Powered by JunebugWiki v0.0.31 Page last edited by stoyan on December 18, 2006 05:08 PM (diff)
[readonly] Version 2 (current) «olderversions