bash-3.00# pwd
/yanxf/zfs
bash-3.00# mkfile -nv 100m 100m.file.1
100m.file.1 104857600 bytes
bash-3.00# mkfile -nv 100m 100m.file.2
100m.file.2 104857600 bytes
bash-3.00# lofiadm -a /yanxf/zfs/100m.file.1
/dev/lofi/1
bash-3.00# lofiadm -a /yanxf/zfs/100m.file.2
/dev/lofi/2
bash-3.00# zpool create mypool mirror /dev/lofi/1 /dev/lofi/2
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 52.5K 63.4M 1.50K /mypool
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 95.5M 78.5K 95.4M 0% ONLINE -
bash-3.00# zfs create mypool/vincent
bash-3.00# zfs create mypool/gary
bash-3.00# zfs create mypool/backup
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 167K 63.3M 27.5K /mypool
mypool/backup 24.5K 63.3M 24.5K /mypool/backup
mypool/gary 24.5K 63.3M 24.5K /mypool/gary
mypool/vincent 24.5K 63.3M 24.5K /mypool/vincent
bash-3.00# df -h -F zfs
Filesystem Size Used Avail Use% Mounted on
mypool 64M 29K 64M 1% /mypool
mypool/vincent 64M 25K 64M 1% /mypool/vincent
mypool/gary 64M 25K 64M 1% /mypool/gary
mypool/backup 64M 25K 64M 1% /mypool/backup
bash-3.00# ls
100m.file.1 100m.file.2
bash-3.00# mkfile -nv 500m 500m.file.3
500m.file.3 524288000 bytes
bash-3.00# mkfile -nv 500m 500m.file.4
500m.file.4 524288000 bytes
bash-3.00# lofiadm -a /yanxf/zfs/500m.file.3
/dev/lofi/3
bash-3.00# lofiadm -a /yanxf/zfs/500m.file.4
/dev/lofi/4
bash-3.00# zpool add mypool mirror /dev/lofi/3 /dev/lofi/4
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
mypool 588M 280K 587M 0% ONLINE -
bash-3.00# zpool status
池:mypool
状态:ONLINE
清理:未请求
配置:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror ONLINE 0 0 0
/dev/lofi/1 ONLINE 0 0 0
/dev/lofi/2 ONLINE 0 0 0
mirror ONLINE 0 0 0
/dev/lofi/3 ONLINE 0 0 0
/dev/lofi/4 ONLINE 0 0 0
错误:无已知的数据错误
bash-3.00# df -h -F zfs
Filesystem Size Used Avail Use% Mounted on
mypool 556M 29K 556M 1% /mypool
mypool/vincent 200M 25K 200M 1% /mypool/vincent
mypool/gary 556M 25K 556M 1% /mypool/gary
mypool/backup 556M 25K 556M 1% /mypool/backup
bash-3.00# zfs set quota=200m mypool/vincent
bash-3.00# zfs set reservation=300m mypool/gary
bash-3.00# zfs set compression=on mypool/backup
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
mypool 300M 255M 28.5K /mypool
mypool/backup 24.5K 255M 24.5K /mypool/backup
mypool/gary 24.5K 555M 24.5K /mypool/gary
mypool/vincent 24.5K 200M 24.5K /mypool/vincent
阅读(3565) | 评论(0) | 转发(2) |