Chinaunix首页 | 论坛 | 博客
  • 博客访问: 573829
  • 博文数量: 118
  • 博客积分: 2114
  • 博客等级: 大尉
  • 技术积分: 1275
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-10 00:02
文章分类

全部博文(118)

文章存档

2019年(1)

2018年(4)

2017年(1)

2016年(6)

2015年(1)

2014年(1)

2013年(5)

2012年(4)

2011年(17)

2010年(13)

2009年(65)

分类:

2011-05-17 20:34:06

 

 

ZFS Command ( ZFS 指令 )

Example ( 例子 )

Create a ZFS storage pool

建立 ZFS儲藏池」

# zpool create mpool mirror c1t0d0 c2t0d0

Add capacity to a ZFS storage pool

為「ZFS儲存池」增加容量

# zpool add mpool mirror c5t0d0 c6t0d0

Add hot spares to a ZFS storage pool

為「ZFS儲存池」增加後備儲存設備

# zpool add mypool spare c6t0d0 c7t0d0

Replace a device in a storage pool

為「ZFS儲存池」更換儲存設備

# zpool replace mpool c6t0d0 [c7t0d0]

Display storage pool capacity

顯示儲存池的容量

# zpool list

Display storage pool status

顯示儲存池的容量

# zpool status

Scrub a pool

檢查一個儲存池的所有儲存設備是否正常。在RaidZ的狀態下,需要一些時間進行驗證,特別是IO、儲存設備出現過問題或故意移除儲存設備後再裝回的情況下,需要的時間會變得更長。通常使用完這個指令後,您需要用 #zpool status -v mpool 來查看檢查的狀態

# zpool scrub mpool

Remove a pool

移除一個儲存池

# zpool destroy mpool

Create a ZFS file system

建立一個ZFS檔案系統

# zfs create mpool/local

Mount a ZFS file system to System Directory

Mount一個ZFS檔案系統到系統目錄中

# zfs set mountpoint=/usr/local rpool2/local

Create a child ZFS file system

建立一個子系的ZFS檔案系統

# zfs create mpool/devel/data

Remove a file system

移除一個檔案系統

# zfs destroy mpool/devel

Take a snapshot of a file system

為一個檔案系統建立一個「snapshot

# zfs snapshot mpool/devel/data@today

Roll back to a file system snapshot

灰複到一個檔案系統「snapshot」時的狀態

# zfs rollback -r mpool/devel/data@today

Create a writable clone from a snapshot

把檔案系統「snapshot」複制到另外一個zfs檔案系統中

# zfs clone mpool/devel/data@today mpool/clones/devdata

Remove a snapshot

移除一個檔案系統「snapshot

# zfs destroy mpool/devel/data@today

Enable compression on a file system

在一個檔案系統中啟動厭縮功能

# zfs set compression=on mpool/clones/devdata

Disable compression on a file system

在一個檔案系統中關閉厭縮功能

# zfs inherit compression mpool/clones/devdata

Set a quota on a file system

在一個檔案系統中設定配額

# zfs set quota=60G mpool/devel/data

Set a reservation on a new file system

在一個新的檔案系統設定預留空間

# zfs create -o reserv=20G mpool/devel/admin

Share a file system over NFS

分享檔案系統給NFS使用

# zfs set sharenfs=on mpool/devel/data

Create a ZFS volume

建立一個ZFS volume

# zfs create -V 2GB mpool/vol

Remove a ZFS volume

移除一個ZFS volume

# zfs destroy mpool/vol

阅读(1705) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~