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
we want to give bonwick a quota of 10 Gbytes
# zfs set quota=10G tank/home/bonwick
# zfs set reservation=5G tank/home/moore # zfs get reservation tank/home/moore NAME PROPERTY VALUE SOURCE tank/home/moore reservation 5.00G local
freebsd# zfs list NAME USED AVAIL REFER MOUNTPOINT tank 97.5K 1.95G 18K /tank tank/neo 18K 1.95G 18K /tank/neo
# 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
原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。