ZFS - quick start.

2009-05-13 07:40:34来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

Pawel Jakub Dawidek
[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
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:安装BackTrack 2.0 final livecd到虚拟机VMware

下一篇:迅驰笔记本"无线上网"配置过程