Home | 簡體中文 | 繁體中文 | 雜文 | 打賞(Donations) | ITEYE 博客 | OSChina 博客 | Facebook | Linkedin | 知乎專欄 | Search | Email

13.4. Creating a Filesystem Hierarchy

13.4.1. Creating a Filesystem

freebsd# zfs create zfs/www
freebsd# mount
/dev/ad0s1a on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
/dev/ad0s1e on /tmp (ufs, local, soft-updates)
/dev/ad0s1f on /usr (ufs, local, soft-updates)
/dev/ad0s1d on /var (ufs, local, soft-updates)
zfs on /zfs (zfs, local)
zfs/www on /zfs/www (zfs, local)
			

freebsd# zfs set compression=gzip zfs/www
			

13.4.2. Setting Quotas

we want to give bonwick a quota of 10 Gbytes

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

13.4.3. Setting Reservations

# zfs set reservation=5G tank/home/moore
# zfs get reservation tank/home/moore
NAME             PROPERTY      VALUE                      SOURCE
tank/home/moore  reservation   5.00G                      local
			

13.4.4. Querying Filesystem Information

freebsd# zfs list
NAME       USED  AVAIL  REFER  MOUNTPOINT
tank      97.5K  1.95G    18K  /tank
tank/neo    18K  1.95G    18K  /tank/neo
			

13.4.5. Renaming a Filesystem

# zfs rename tank/home/maybee tank/ws/maybee
			

13.4.6. Destroying a Filesystem

# zfs destroy tank/home/tabriz
			

# zfs destroy tank/home/ahrens
cannot unmount 'tank/home/ahrens': Device busy

# zfs destroy -f tank/home/ahrens
			
# zfs destroy -r tank/home/schrock
cannot destroy 'tank/home/schrock': filesystem has dependant clones
use '-R' to destroy the following datasets:
tank/clones/schrock-clone

# zfs destroy -R tank/home/schrock