论坛风格切换切换到宽版
  • 7277阅读
  • 5回复

[web环境]Solaris10下如何使用ZFS<转> [复制链接]

上一主题 下一主题
离线木逸
 
发帖
1588
金钱
1068
威望
370
只看楼主 倒序阅读 使用道具 楼主  发表于: 2007-09-16
ZFS,作为Solaris 10的下一代文件存储解决方案,ZFS即Zettabyte File System,也叫动态文件

系统Dynamic File System, 是第一个128位文件系统,无限容量、自优化、永远数据一致、管理简

单:

- 支持POSIX文件系统

- 无限容量,比32/64位文件系统大16  billion billion倍

- 对于应用来说,ZFS像一个标准的POSIX文件系统

- 对于系统管理员来说,ZFS提供存储池的模型,彻底消除了卷管理的概念,及其带来的硬盘分区的问

题,可以使所有文件系统利用存储池的所有设备的访问带宽,100%在线维护。

- 所有操作采用copy-on-write方式,硬盘状态永远有效, 无需fsck。

- 所有数据块被64位校验, 防止数据瘫痪, 并且数据可做Raid,其中一个数据损坏可由另一数据修复。

- 提供无限份的快照,提供磁盘限额

1. 检查预装OS,如无 ZFS包,则需安装软件包:

# pkginfo |grep SUNWzfs

# pkgadd -d .

The following packages are available:

1  SUNWzfs    Zettabyte File System (ZFS)

              (sparc) 11.10.0,REV=2004.12.26.02.38

Select package(s) you wish to process (or 'all' to process

all packages). (default: all) [?,??,q]:1

...

Installation of <SUNWzfs> was successful.

2. 建立storage pool:

# zpool create -f testpool mirror /dev/dsk/c0t1d0s0 /dev/dsk/c0t1d0s1

# zpool df testpool

Pool                  size  used  avail capacity

-------------------- ------ ------ ------ --------

testpool              500M  56.0K  500M    1%

# zpool vdevs -v testpool

mirror1

c0t1d0s0

c0t1d0s1

3. 建立文件系统:

# zfs create testpool/user1

# zfs create testpool/user2

# mkdir -p /disk/user1 /disk/user2

# zfs mount testpool/user1 /disk/user1

# zfs mount testpool/user2 /disk/user2

# df -h -F zfs

文件系统              大小  用了  可用 容量    挂接在

testpool/user1        484M  27K  484M    1%    /disk/user1

testpool/user2        484M  27K  484M    1%    /disk/user2

4. 测试ZFS的读写变化:

# cp /etc/n* /disk/user1; cp /etc/m* /disk/user2

# df -h -F zfs

文件系统              大小  用了  可用 容量    挂接在

testpool/user1        484M  60K  484M    1%    /disk/user1

testpool/user2        484M 123K  484M    1%    /disk/user2

5. 增加新的存储到storage pool,扩展ZFS:

# zpool add -f testpool mirror c0t1d0s3 c0t1d0s4

# zpool df testpool

Pool                  size  used  avail capacity

-------------------- ------ ------ ------ --------

testpool              1000M  303K  1000M    1%

s6a# zpool vdevs -v testpool

mmirror1

c0t1d0s0

c0t1d0s1

mirror2

c0t1d0s3

c0t1d0s4

# df -h -F zfs

文件系统              大小  用了  可用 容量    挂接在

testpool/user1      982M  60K  982M    1%    /disk/user1

testpool/user2      982M  123K  982M    1%    /disk/user2

6. 破坏storage pool硬盘的数据,观察ZFS中数据不受影响:

# dd if=/dev/urandom of=/dev/rdsk/c0t1d0s1 count=10000

10000+0 记录进入

10000+0 记录调出

# df -h -F zfs

文件系统              大小  用了  可用 容量    挂接在

testpool/user1      982M  60K  982M    1%    /disk/user1

testpool/user2      982M  123K  982M    1%    /disk/user2

# diff /etc/nsswitch.conf /disk/user1/nsswitch.conf

总结:

文件系统管理,ZFS提供一个新的易于使用的自动管理的模型,降低复杂性,减少错误和实施的时间。

数据安全和完整性, ZFS数据在任何时间都是一致的。

对于资源利用,ZFS存储池可为多个文件系统共享。

增加灵活性, ZFS扩展或缩小是动态的,无需系统管理员介入 。

降低费用,可免除额外的卷管理的许可费用。
浙江温州电信机房100M独享,仅1600元/月
--更多优惠请登录 www.chinaccnet.com
有意向联系我QQ:1026195096
离线f1_racing
发帖
4
金钱
177
威望
0
只看该作者 沙发  发表于: 2007-09-17
学习啦

转借此处AD一下------------
F1赛车网
f1直播    f1在线直播
离线﹎sκyˊ☆

发帖
17201
金钱
187
威望
804
只看该作者 板凳  发表于: 2007-09-19
哪有下载?
离线yummy2008
发帖
30
金钱
183
威望
0
只看该作者 3楼 发表于: 2007-09-29
Solaris10玩起来费劲死了,不过sun新版的Solaris可能比较简单,谁试验了么?效果如何?
发帖
264
金钱
255
威望
-1
只看该作者 4楼 发表于: 2007-10-01
     
发帖
264
金钱
255
威望
-1
只看该作者 5楼 发表于: 2007-10-01
 
快速回复
限80 字节
温馨提示:欢迎交流讨论,请勿纯表情、纯引用!
 
上一个 下一个