Installation HOWTO

From Dazuko
(Difference between revisions)
Jump to: navigation, search
(updated for dazukofs 3.0.0)
(rename test mount directory)
Line 46: Line 46:
 
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:
 
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/test
+
# mkdir /tmp/testmnt
# mount -t dazukofs /tmp/test /tmp/test
+
# 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:
 
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:
Line 62: Line 62:
 
The test program can be ended by hitting Ctrl-C. The DazukoFS filesystem can be unmounted with:
 
The test program can be ended by hitting Ctrl-C. The DazukoFS filesystem can be unmounted with:
   
# umount /tmp/test
+
# umount /tmp/testmnt
   
 
== Step 5: Install DazukoFS ==
 
== Step 5: Install DazukoFS ==

Revision as of 16:21, 25 February 2009

This page briefly outlines 5 steps to compiling and installing DazukoFS. If you do not have experience compiling kernel modules or working with stackable filesystems, it is recommended that you first read through the DazukoFS documentation before installing DazukoFS.


The information on this page refers to DazukoFS 3.x versions. Information about installing Dazuko 2.x can be found on the page 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/test 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.

Personal tools