zfs基礎命令

zpool create 池的名字     硬盤號
zpool create -n      測試
zpool create -m      指定掛載點
zpool list      看有什麼池
zpool status      看池裏面有什麼硬盤 和運行狀態 或者加 -x 查看壞的池
zpool destory [-f 強行] 池名     刪除池
----------------------------------------------------高---級---------------------------------------------------------
zpool create 池的名字 mirror 硬盤號   創建鏡像卷
zpool create 池的名字 mirror 硬盤號 mirror 硬盤號 創建雙向存儲池
zpool create 池的名字 raidz[raid2 允許壞幾個硬盤] 創建RAIDZ分區
zpool add tank spare 硬盤號    添加熱備硬盤
zpool add [mirror raidz] 池 硬盤號   向池裏面添加硬盤
zpool detach zeepool c2t1d0    分離設備
zpool attach zfspool c1t1d0 c2t1d0   添加設備到鏡像卷
zpool replace tank c1t1d0 c1t2d0   替換設備
-----------------------------------------------------------------------------------------------------------------------
zfs create tank/home     創建分層結構
zfs set mountpoint=/export/home  tank/home   更改掛載目錄
zfs set sharenfs =on tank/home
zfs set compression=on tank/home
zfs get compression tank /home
zfs set quota=10g tank/home    磁盤配額
zfs list 查看掛載情況
zfs destory[-f 強行]     銷燬
------------------------------------------------------------------------------------------------------------------------------------
理論快照數是 264
zfs snapshot[-r 遞歸]data/home/tom@snapshot01   創建快照 叫做snapshot01
zfs rename data/home/tom@snapshot01 data/home/tom@snapshot02 重命名快照
ls /home/tom/.zfs/snapshot     訪問快照
zfs list -t snapshot      查看快照
zfs destroy data/home/tom@snapshot01    銷燬快照
zfs rollback [-r強制回滾]data/home/tom@snapshot02  回滾快照
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章