Das Dateisystem AVFS im Praxis
Virtually unwrapped...
Using unix-systems you will find many fils with cryptic extensions like .tar.gz, .tgz, .rpm or .tar.Z.
And soon you will see: Working with archives and compression is more important here that on windows platforms.
May it be unusual to unpack the files and delete them after you have found and read the file you were looking for this becomes rather annoying after a while.
But no fear - here comes INternational Rescue:
VFS for Shell-Junkies
In the meantime the good old "midnight commander", Konqueror or the GNOME-filemanager-giant Nautilus do all have
their tricks to let compressed files and even packages (like RedHat's RPMs or the DEB-files of Debian) look like simple folders.
The magical word is "Virtual FileSystems" (short VFS).
The idea is simple, but genius: Users are given the possibility to work on compressed folders or network ressources (e.g. FTP) just like they were local folder.
Mechanisms in the background 'translate' the users actions for using them with the original tool for this kind of ressource (decompression tools for packed files, ftp and rsh for networ ressources etc.)
In general this is a great idea so you don't have to unpack all 174 archives in /home/johndoe/download just to read the README-file and see that it is still not the one you're looking for.
On the other hand a giant tool like Nautilus can not be used, either because of limited system ressources or simply out of personal reasons.
Even mc is not always available (e.g. when working remote on a terminal-server via modem).
Right then you will be looking for a way to use shell commands (the ones we know, please. Meaning ls, cd and so on) to get the same effect.
This is where AVFS comes into cause AVFS supplies us with exactly these functions!
This article will guide you throuh installatioN and configuration of AVFS on a GNU/Linux-system.
It shall show you how to use it and also tell the restrictions of this solution.
Installation
For installing AVFS you'll need a 2.2.x or 2.4.x-series kernel as well as a developer environment.
Our test-system is a Debian-Sid system with Pentium 166 running a 2.4.18 kernel and the corresponding header-package (kernel-headers-2.4.18).
Choose between two ways of installing AVFS:
(a) Using LD_PRELOAD: AVFS is being installed as library and will be loaded whenever a shell or application is launched.
(b) Using CODA: The Coda-filesystem originally is a network filesystem like AFS with some extended features but (still) some bugs.
With AVFS the Coda-client is used as filesystem-interface to provide access to the AVFS-functionality.
Both possibilities do have their restrictions by now:
Method b does not implement writing access to the archived fils. Method a ist used mainly on Solaris-systems by now. Though the Solaris version has several
problems with the glibc-versions used in current GBU/Linux distributions and the fastness and stability of the Coda-method we will focus on this method here.
For this way of installation supprot for coda-filesystem has to be compiled as module or directly into the kernel.
To check whether it is available do a
>> /sbin/modprobe coda
at the shell prompt or have a look at /proc/filesystems If modprobe fails with "can't locate module coda" and you can't find "nodev coda" in the list of supported filesystems you have to recompile your kernel
with the option "CONFIG_CODA_FS=m" in /usr/src/linux/.config (Section "Network Filesystems").
When this is done and after booting the new kernel without panics or other errors the installation of AVFS can begin..
After unpacking the archive the well-known steps
./configute --disable-preload, make, make install
will do their work.
If ./configure should fail have a look at the configuration options and deactivate features you don't need (such as WebDAV).
Normally the installation works without problems and on most systems "make install" does not only install the software but sets up scripts to start the avfscoda-system on startup.
If you find messages like
| Systemlog |
Oct 10 01:29:53 kassiopeia kernel: redir cleanup Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 12 [c38b6674] with [c012dc34] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 106 [c38b67a0] with [c0134840] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 107 [c38b684c] with [c0134920] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 33 [c38b68fc] with [c012db0c] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 5 [c38b69c0] with [c012e4e0] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 85 [c38b6a9c] with [c0134a50] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 183 [c38b6bd0] with [c013f044] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 195 [c38b6d7c] with [c0134c28] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 196 [c38b6e30] with [c0134ca0] Oct 10 01:29:53 kassiopeia kernel: replacing syscall nr. 11 [c38b6f4c] with [c0105a6c] |
Working with AVFSCODA
The startup-scripts that have been created during installation do not only load the needed kernel modules (coda.o and redir.o)
but start the avfscoda-software, too.
Thus you should be able to use it right after loggin in.
test it e.g. like that:
[kassiopeia]--[11:51:22]--[511]--[$] : cat /#avfsstat/version Interface version: 0.9.3 Compile date: Die Sep 10 23:48:15 CEST 2002 Compile system: Linux 2.4.18-586tsc i586 Module directory: /usr/lib/avfsIf this ends up with an error message you probably have to start the avfs-system explicitly.
cd /#avfs-on
This should (especially after booting the computer) be obolete, but under some circumstances when accessing archives (repectively their content) fails avfs changes to a state where it has to be reactivated manually. Usually it is activated and commands like these should work:
[kassiopeia]--[12:11:22]--[524]--[$] : cd slick-1.3.1.tar.gz#/ [kassiopeia]--[12:11:35]--[525]--[$] : ls slick [kassiopeia]--[12:13:15]--[532]--[$] : ls -l cpp_einf.zip#/ insgesamt 363 -rw-r--r-- 1 kristian kristian 188 1999-02-22 __header.htm -rw-r--r-- 1 kristian kristian 370926 1998-01-05 index.htm [kassiopeia]--[12:14:07]--[540]--[$] : cat rox_1.2.1-1_i386.deb#/control.tar.gz#/control Package: rox Version: 1.2.1-1 Section: x11 Priority: optional Architecture: i386 ... [kassiopeia]--[12:15:11]--[545]--[$] : vi avfs-0.9.3.tar.gz#/avfs-0.9.3/READMEOK, the commands using the "#" are something you have to get used to, but if you got used to them you won't miss them anymore - be it a fast way to copy single files out of an archive, greping through source-packages or "diff"ing patches against archived and packed versions.
AVFS outside the shell
But AVFS is more flexible than being for use at the shell only. Though coda is practically a complete filesystem theoretically every program can use the coda-functions. You can open a text-file out of an archive into an emacs-wondow e.g.:

Unfortunately this does not work with every program, yet.
Trying to open the same file as in the example above using gedit led to a view at a cryptic text and the need to restart AVFS.
Similar problems are to expect with the GTK-based browser dillo. Most tested filemanagers did work great.
And more: The rox-filemanager, which is well reputated by now already, is prepared for being used with AVFS.
The option "Open with AVFS" in the menu enables you - a running AVFS-system required - to have a quick and easy peek into archives and packages.

Fazit
AVFS is interesting for all who look for fast handling of archives and packages at the shell.
Important would be the implementation of writing access to the archives content. This way AVFS would become even more interesting.
Users using mainly KDE, KNOME or similar environments should stick to the provides solutions.
At present AVFS has release number 0.9.3 which hasn't changed since february 2002 - hope that the developers didn't stop their work and we may look forward to improvements.
Links
| http://www.inf.bme.hu/~mszeredi/avfs | AVFS-Homepage (merely up-to-date) |
| http://sourceforge.net/projects/avfs | Sourceforge-Site for downloading AVFS |
| http://www.coda.cs.cmu.edu/ | CODA-homepage (background iformation and technical details) |
Talkback Area
Enter Own Comment