原文(繁体中文):http://don.7mix.net/archives/192
安裝 DazukoFS:
DasukoFS官网:http://dazuko.dnsalias.org/wiki/index.php/Main_Page
DazukoFS下载:http://dazuko.dnsalias.org/wiki/index.php/Downloads
# uname -a #Linux localhost.localdomain 2.6.26.8-57.fc8 #1 SMP Thu Dec 18 19:19:45 EST 2008 i686 i686 i386 GNU/Linux #tar -zxf dazukofs-3.0.0.tar.gz #cd dazukofs-3.0.0
安装请参考README文档,目前提供的 patch有如下几个版本:
patch-linux-2.6.16 patch-linux-2.6.20 patch-linux-2.6.24 patch-linux-2.6.18 patch-linux-2.6.22 patch-linux-2.6.26 patch-opensuse-11.0 patch-opensuse-11.1 patch-ubuntu-8.10
按照uname的显示,进行patch。如:
#patch -p1 < patches/patch-linux-2.6.26 #make #make dazukofs_install #/sbin/modprobe dazukofs #dmesg | grep dazukofs
应该显示:dazukofs: loaded, version=3.0.0
测试:
#mkdir /tmp/dazukofs_test #mount -t dazukofs /tmp/dazukofs_test /tmp/dazukofs_test #cp /bin/a* /tmp/dazukofs_test
建立测试程序:
#cd test #make #env LD_LIBRARY_PATH=lib ./showfiles
开启新的窗口:
#find /tmp/dazukofs_test -type f | xargs file
显示:
/tmp/dazukofs_test/arch: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
/tmp/dazukofs_test/alsaunmute: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
/tmp/dazukofs_test/alsacard: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
/tmp/dazukofs_test/awk: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
出现类似上述信息,表示加载成功
回前一个终端会看到如以下的打印:
pid:10173 file:/tmp/dazukofs_test
pid:10173 file:/tmp/dazukofs_test
pid:10175 file:/tmp/dazukofs_test/arch
pid:10175 file:/tmp/dazukofs_test/alsaunmute
pid:10175 file:/tmp/dazukofs_test/alsacard
pid:10175 file:/tmp/dazukofs_test/awk
按 Ctrl+C 結束测试进程
^C
Goodbye.
[root@fedora test]# umount /tmp/dazukofs_test
启动自动挂载 DazukoFS 文件系统:
最简单的方法就是直接编辑 /etc/fstab,例如:
# vi /etc/fstab
/var/mysql /var/mysql dazukofs defaults 0 0
/usr /usr dazukofs defaults 0 0
开机时自动挂载/var/mysql 及 /usr 目录