ZFS - quick start.
2009-05-13 07:40:34来源:未知 阅读 ()
[email=freebsd-current%40freebsd.org?Subject=ZFS%20-%20quick%20start.&In-Reply-To=]pjd at FreeBSD.org [/email]
Ok, ZFS is now in the tree, what's now? Below you'll find some
instructions how to quickly make it up and running.
First of all you need some disks. Let's assume you have three spare SCSI
disks: da0, da1, da2.
Add a line to your /etc/rc.conf to start ZFS automatically on boot:
# echo 'zfs_enable="YES"' >> /etc/rc.conf
Load ZFS kernel module, for the first time by hand:
# kldload zfs.ko
Now, setup one pool using RAIDZ:
# zpool create tank raidz da0 da1 da2
It should automatically mount /tank/ for you.
Ok, now put /usr/ on ZFS and propose some file systems layout. I know
you probably have some files already, so we will work on /tank/usr
directory and once we ready, we will just change the mountpoint to /usr.
# zfs create tank/usr
Create ports/ file system and enable gzip compression on it, because
most likely we will have only text files there. On the other hand, we
don't want to compress ports/distfiles/, because we keep compressed
stuff already in-there:
# zfs create tank/usr/ports
# zfs set compression=gzip tank/usr/ports
# zfs create tank/usr/ports/distfiles
# zfs set compression=off tank/usr/ports/distfiles
(You do see how your life is changing, don't you?:))
Let's create home file system, my own home/pjd/ file system. I know we
use RAIDZ, but I want to have directory where I put extremly important
stuff, you I'll define that each block has to be stored in tree copies:
# zfs create tank/usr/home
# zfs create tank/usr/home/pjd
# zfs create tank/usr/home/pjd/important
# zfs set copies=3 tank/usr/home/pjd/important
I'd like to have directory with music, etc. that I NFS share. I don't
really care about this stuff and my computer is not very fast, so I'll
just turn off checksumming (this is only for example purposes! please,
benchmark before doing it, because it's most likely not worth it!):
# zfs create tank/music
# zfs set checksum=off tank/music
# zfs set sharenfs=on tank/music
Oh, I almost forget. Who cares about access time updates?
# zfs set atime=off tank
Yes, we set it only on tank and it will be automatically inherited by
others.
Will be also good to be informed if everything is fine with our pool:
# echo 'daily_status_zfs_enable="YES"' >> /etc/periodic.conf
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
- Freebsd oracle 10g 2009-05-13
- KDE/FreeBSD 测试 QT-4.5.1. 2009-05-13
- 安装'User manager for PureFTPd'无法建表? 2009-05-13
- OpenBSD 4.5下安装Gnome 2.24成功! 2009-05-13
- OpenBSD 4.5 2009-05-13
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash