bash-3.00# uname -a
SunOS solhost 5.10 Generic_118855-33 i86pc i386 i86pc Solaris
bash-3.00# mkdir -p /yanxf/zfs
bash-3.00# cd /yanxf/zfs
bash-3.00# mkfile -nv 100m 100m.file.1
100m.file.1 104857600 bytes
bash-3.00# ls
100m.file.1
bash-3.00# lofiadm -a /yanxf/zfs/100m.file.1
/dev/lofi/1
bash-3.00# lofiadm
Block Device File
/dev/lofi/1 /yanxf/zfs/100m.file.1
bash-3.00# zpool create firstpool /dev/lofi/1
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
firstpool 95.5M 52.5K 95.4M 0% ONLINE -
bash-3.00# zpool status
池:firstpool
状态:ONLINE
清理:未请求
配置:
NAME STATE READ WRITE CKSUM
firstpool ONLINE 0 0 0
/dev/lofi/1 ONLINE 0 0 0
错误:无已知的数据错误
bash-3.00# zfs create firstpool/firstfs
bash-3.00# zfs create firstpool/secondfs
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
firstpool 136K 63.4M 27.5K /firstpool
firstpool/firstfs 24.5K 63.4M 24.5K /firstpool/firstfs
firstpool/secondfs 24.5K 63.4M 24.5K /firstpool/secondfs
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
firstpool 95.5M 140K 95.4M 0% ONLINE -
bash-3.00# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dsk/c0d0s0 67G 4.7G 61G 8% /
swap 2.2G 732K 2.2G 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
67G 4.7G 61G 8% /lib/libc.so.1
swap 2.2G 88K 2.2G 1% /tmp
swap 2.2G 36K 2.2G 1% /var/run
firstpool 64M 28K 64M 1% /firstpool
firstpool/firstfs 64M 25K 64M 1% /firstpool/firstfs
firstpool/secondfs 64M 25K 64M 1% /firstpool/secondfs
bash-3.00# cd /firstpool/firstfs/
bash-3.00# mkfile -v 200m bigfile
bigfile 209715200 bytes
bigfile: initialized 66068480 of 209715200 bytes: No space left on device
bash-3.00# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dsk/c0d0s0 67G 4.7G 61G 8% /
swap 2.2G 732K 2.2G 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
67G 4.7G 61G 8% /lib/libc.so.1
swap 2.2G 88K 2.2G 1% /tmp
swap 2.2G 36K 2.2G 1% /var/run
firstpool 28K 28K 0 100% /firstpool
firstpool/firstfs 64M 64M 0 100% /firstpool/firstfs
firstpool/secondfs 25K 25K 0 100% /firstpool/secondfs
bash-3.00# cd /yanxf/zfs
bash-3.00# mkfile -nv 1g 1g.file
1g.file 1073741824 bytes
bash-3.00# ls
100m.file.1 1g.file
bash-3.00# lofiadm -a /yanxf/zfs/1g.file
/dev/lofi/2
bash-3.00# zpool add firstpool /dev/lofi/2
bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
firstpool 1.09G 63.7M 1.02G 5% ONLINE -
bash-3.00# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dsk/c0d0s0 67G 4.7G 61G 8% /
swap 2.2G 732K 2.2G 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
67G 4.7G 61G 8% /lib/libc.so.1
swap 2.2G 88K 2.2G 1% /tmp
swap 2.2G 36K 2.2G 1% /var/run
firstpool 1016M 28K 1016M 1% /firstpool
firstpool/firstfs 1.1G 64M 1016M 6% /firstpool/firstfs
firstpool/secondfs 1016M 25K 1016M 1% /firstpool/secondfs
bash-3.00# cd /firstpool/firstfs
bash-3.00# ls -l
total 64789
-rw------- 1 root root 209715200 2007-04-21 09:50 bigfile
bash-3.00# pwd
/firstpool/firstfs
bash-3.00# ls
bigfile
bash-3.00# mkfile -v 200m 200m.file.2
200m.file.2 209715200 bytes
bash-3.00# ls -l
total 246460
-rw------T 1 root root 209715200 2007-04-21 09:55 200m.file.2
-rw------- 1 root root 209715200 2007-04-21 09:50 bigfile
bash-3.00# cd /
bash-3.00# zpool destroy firstpool
bash-3.00# lofiadm -d /dev/lofi/1
bash-3.00# lofiadm -d /dev/lofi/2
bash-3.00# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dsk/c0d0s0 67G 5.7G 60G 9% /
swap 2.3G 732K 2.3G 1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1
67G 5.7G 60G 9% /lib/libc.so.1
swap 2.3G 88K 2.3G 1% /tmp
swap 2.3G 36K 2.3G 1% /var/run
阅读(3409) | 评论(0) | 转发(2) |