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
		




原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

目录
相关文章
|
7月前
|
Oracle 关系型数据库
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
Customer RecommendedORA-27090 - Unable to Reserve Kernel Resources for Asynchronous Disk I/O
50 4
|
7月前
【echarts报错】: ‘normal‘ hierarchy in itemStyle has been removed since 4.0.
【echarts报错】: ‘normal‘ hierarchy in itemStyle has been removed since 4.0.
368 0
|
虚拟化
成功解决Failed to execute stage ‘Setup validation’: Hardware does not support virtualization.
成功解决Failed to execute stage ‘Setup validation’: Hardware does not support virtualization.
成功解决Problem while trying to mount target
成功解决Problem while trying to mount target
FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
/******************************************************************************** * FAT-fs (mmcblk0p1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck. * 说明: * 系统更新的时候遇到这个错误,记录一下处理步骤,其原因是我自己把其umount了 * 导致的问题。
6399 0