免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1196 | 回复: 0
打印 上一主题 下一主题

Create Storage Pool and File System [复制链接]

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-09 22:32 |只看该作者 |倒序浏览
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

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/524/showart_296618.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP