Top / Linux / Dazuko / Installation HOWTO

インストール HOWTO


このページでは、DazukoFS のコンパイルとインストールを簡単に5ステップに要約しています。カーネルモジュールのコンパイルやスタッカブルファイルシステムを使用したことが無い場合は、DazukoFSをインストールする前にDazukoFS の文書を読むことが推奨されます。

このページの情報はDazukoFS 3.x バージョンに関するものです。Dazuko 2.x のインストールに関する情報は Installation HOWTO (Dazuko 2.x) ページをご覧ください。

Step 1: Get your kernel source code

DazukoFS is available as a kernel module. Once a kernel module is loaded it becomes one with your kernel, calling and sharing the same set of functions as the kernel. This is why the kernel source code is required in order to build DazukoFS. Many distributions provide packages with the kernel source code. If you do not plan on building a new kernel, make sure you install the proper kernel source packages for your distribution.

Step 2: Compile DazukoFS

DazukoFS was written to work with a particular kernel version. Refer to the README included in the package to see which version it was written for. In order to support other kernel versions, various patches have been included in the package. If DazukoFS was not written for your running kernel, a patch may be available to modify DazukoFS code for your kernel.

As an example, to patch the DazukoFS code to support the openSUSE 11.1 kernel, you would give the command:

$ patch -p1 < patches/patch-opensuse-11.1

Once the DazukoFS code has been patched (if it was necessary to do so), you can compile DazukoFS with:

$ make

You may need to manually edit the Makefile to specify where your kernel sources are located if they are not in the default location.

Please read over the FAQ if you encounter problems.

Step 3: Insert DazukoFS

Once you have successfully compiled DazukoFS, the final step is to insert the module into the kernel. To do this, you must have root priveledges. This can be done with the command:

# /sbin/insmod dazukofs.ko

If you don't get any messages, this is a good sign. To verify that the module has been loaded correctly, type:

$ cat /proc/filesystems | grep dazukofs

If you see "dazukofs" then the DazukoFS driver has been successfully loaded.

Step 4: Test DazukoFS

File access contol is only possible on directory trees where DazukoFS has been mounted. To test DazukoFS, you can create a test directory and mount DazukoFS on top of it. You will need to be root in order to perform the mount:

# mkdir /tmp/testmnt
# mount -t dazukofs /tmp/testmnt /tmp/testmnt

Once a DazukoFS mount exists, an application is able to handle file access control on that mount. To test DazukoFS, you can try out the test program (showfiles) included in the test subdirectory. You can build the test program with:

$ cd test
$ make

By default DazukoFS will only operate with processes that are running as root. Therefore you need to be root when you run the test program.

# ./showfiles

Once the test program is running, open up another terminal or shell. Create some file within the /tmp/testmnt directory. As files are accessed, the test program should output various information. The test program always permits the accesses, however another application could be written that denies file accesses in certain conditions.

The test program can be ended by hitting Ctrl-C. The DazukoFS filesystem can be unmounted with:

# umount /tmp/testmnt

Step 5: Install DazukoFS

After you have verified that DazukoFS works correctly on your system, you will probably want to install it on the system (so that it is easily available). From the original DazukoFS source code directory (not the test directory) you can run (as root):

# make dazukofs_install

This performs the necessary actions to install the DazukoFS device driver to your system.

トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2009-09-14 (月) 10:41:36 (5126d)