Ubuntu安装ZFS

下面将指导大家在Ubuntu/Linux 上安装原生的ZFS 文件系统。
测试环境:Linux 2.6.35-24-generic #42-Ubuntu SMP x86_64 GNU/Linux Ubuntu 10.10 ,也适用于Ubuntu 10.04。

确保安装以下软件包
build-essential
gawk
zlib1g-dev
uuid-dev

若没有安装,使用命令,安装:
sudo apt-get install build-essential gawk zlib1g-dev uuid-dev

现在准备从http://zfsonlinux.org/安装SPL和ZFS
sudo cd /usr/src

下载最新版本:
sudo wget http://github.com/downloads/behlendorf/spl/spl-0.5.2.tar.gz
sudo wget http://github.com/downloads/behlendorf/zfs/zfs-0.5.2.tar.gz

构建SPL(编译ZFS时会用到)
sudo tar -xvzf spl-0.5.2.tar.gz

sudo cd spl-0.5.2/

sudo ./configure

sudo make

 

sudo make install

构建ZFS
cd ..

sudo tar -xvzf zfs-0.5.2.tar.gz

sudo cd zfs-0.5.2/ sudo ./configure

sudo make

 

sudo make install

查看一下splat是否工作,ZFS模块已经装载:
sudo modprobe splat

sudo splat -a

sudo modprobe zfs

 

lsmod |grep zfs

OK~~

如果丢失路径 LD_LIBRARY_PATH,所有的ZFS命令都将出现如下错误:
zfs: error while loading shared libraries: libspl.so.0: cannot open shared object file: No such file or directory
可添加环境,加以修正:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
好了~~

来源『http://www.howtoforge.com/』,本文由Bentutu.com编辑,转载注明出处

 

Advertisements


发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s