有谁用过吗?

ashchen 回复于:2005-05-23 21:35:29

看到好多s10 zfs的介绍,但是没有说怎么用这种文档系统

alfee 回复于:2005-05-24 10:32:09
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

3。测试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

4。增加新的存储到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

5。破坏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扩展或缩小是动态的,无需系统管理员介入
降低费用,可免除额外的卷管理的许可费用






ashchen 回复于:2005-05-24 11:16:26
跪谢。
但我的DVD安装盘里没找到SUNWzfs

herowang79 回复于:2005-05-24 12:11:14
真是受益匪浅呀

ywsun 回复于:2005-05-24 12:56:55
很好!

alfee 回复于:2005-05-24 14:37:46
ZFS 现在才是Beta,比Solaris 10 GA晚了,但可从 Sun要到分开的软件包单装,玩一玩,用一个硬盘试验的,体会一下觉得有点意思。

ashchen 回复于:2005-05-24 14:55:45
感谢回复。
solaris10的几个新技术都不错,但都还没体验。
Dynamic Tracing &
Solaris Grid Containers &
Predictive Self-Healing &
ZFS Technology &

文章整理:西部数码--专业提供域名注册虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!