========================================================== Filesystem in Userspace for Mark5A/B dispacks Light the fuse! ;-)) http://fusemk5a.sourceforge.net/ Copyright (C) 2007 Jan Wagner Version 1.02 ========================================================== The fuseMk5A userspace filesystem provides read-only access to the scans on the diskpack. The scans will be visible as normal files in a normal directory, and they can be used just like any normal files from any program you like. 1 -- Install FUSE FUSE is a general file system layer that file system providers such as fuseMk5A, sshfs, obexfs and others use. If you are installing on a Haystack Mark5 and/(or...) kernel 2.4, and quite probably you are, then see either README-SargePreparations.txt or README-RedhatPreparations.txt If you have a 2.6 kernel, then install FUSE utilities. Use the official packages provided in your Linux distro. If you instaled the Mark5 OS distribution from the Haystack Website, which is Debian Etch then see README-EtchPreparations.txt Note: Initial testing of the FUSE 2.7 kernel module version has been tested with fuseMk5A. 2 -- Compile and install fuseMk5A To compile fuseMk5A, please first look for the SDK files. Execute the following command $ locate xlrapi.h xlrtypes.h xlrdbcommon.h libssapi.a xlrapi.h xlrtypes.h xlrdbcommon.h (required for SDK8.X) libssapi.a on your Mark5. Copy these files into the same directory as the fuseMk5A source code. Make sure that you have the 'g++' compiler version 3.3 installed. The StreamStor SDK libraries are for version g++ 3.3. If you have StreamStor SDK 7.x not 6.x, then edit the Makefile and add '-lwdapi801 -lm' to LDFLAGS. If you have StreamStor SDK 8.x then edit the Makefile and add '-lwdapi910 -lm' to LDFLAGS. To compile fuseMk5A, simply run $ make To install and do some usability tuning, run: $ sudo make install This copies fuseMk5A into /usr/bin/ and already does the steps in section 3 -- Usability tuning. It also edits /etc/rc.local (Redhat) or /etc/modules (Debian) to load 'fuse' automatically on boot. 3 -- Some usability tuning Optional! These steps are already done during the 'sudo make install'. You _may_ do them manually as well. The 'fuse' kernel module must be loaded for any fuse programs to work. First time: $ sudo modprobe fuse Optional: you can make 'fuse' to be modprobed automatically at system boot. RH9: root$ echo "modprobe fuse" >> /etc/rc.local Debian: root$ echo "fuse" >> /etc/modules Now create a mount point for fuseMk5A and allow normal users to unmount it: $ sudo mkdir /mnt/diskpack $ sudo chmod a+rwxt /mnt/diskpack $ sudo chown oper:users /mnt/diskpack The fuseMk5A v1.0.2 and later use the diskpack's user directory. The fuseMk5A v1.0.1 and older use '/var/dir/Mark5A' for the directory list, similar to the DirList program. Here, the following applies: You can allow fuseMk5A to update /var/dir/Mark5A with a fresher copy read from the diskpack. This needs write permissions: $ sudo chmod a+rw /var/dir/Mark5A One benefit is that there will be no confusion if you switch the diskpack but forget to re-run Mark5A to regenerate /var/dir/Mark5A. fuseMk5A will do that for you. 4 -- Typical usage To start: You must stop the 'Mark5A' program with 'EndM5' before starting fuseMk5A, otherwise the 'Mark5A' program may work erratically (some may consider this normal behaviour ;-) oper@Mark5-637[1]% ./fuseMk5A /mnt/diskpack The fuseMk5A will then run in verbose mode and stay in the foreground, with debug output. Don't stop it with Control-C, instead unmount it from another console window. Mount options: --verbose debug output and foreground mode, default is non-verbose (due to some fuse-utils 2.5.x/2.6.x bug, it is recommended you always use --verbose, unless you update to fuse-utils 2.7.x) --bank=[0|1] select diskpack in bank A (0) or B (1), default is bank A --cachesize=n specify read cache size in bytes, default is around 16MB Usage: If fuseMk5A has been started in verbose/foreground mode, open new console windows to do your tasks. Short demo: oper@Mark5-637[111]% ll /mnt/diskpack/euro89_cta* -r--r--r-- 1 oper users 960411032 Dec 31 1969 /mnt/diskpack/euro89_cta26_246-2239 -r--r--r-- 1 oper users 2304363960 Dec 31 1969 /mnt/diskpack/euro89_cta26_246-2357 -r--r--r-- 1 oper users 2207595680 Dec 31 1969 /mnt/diskpack/euro89_cta26_247-0045 -r--r--r-- 1 oper users 2112310824 Dec 31 1969 /mnt/diskpack/euro89_cta26_247-0228 -r--r--r-- 1 oper users 2111945200 Dec 31 1969 /mnt/diskpack/euro89_cta26_247-0615 oper@Mark5-637[112]% /usr/bin/time cat /mnt/diskpack/euro89_cta26_246-2239 > /dev/null 0.20user 0.63system 0:09.79elapsed 8%CPU (0avgtext+0avgdata 0maxresident)k 0inputs+0outputs (108major+12minor)pagefaults 0swaps Note: due to memcpy()s done by FUSE and the kernel, the throughput on a old Mark5 machine is only around 800 Mbit/s. You can test the raw read speed by running the included ./maxspeed program (at Metsähovi it gives ~1.5 Gbit/s). The FUSE performance should be around half of this, and perhaps even better. To unmount the diskpack: oper@Mark5-637[113]% umount /mnt/diskpack 4 -- Troubleshooting If there are FUSE errors when you try fuseMk5A, your FUSE setup might not be correct. You can test by trying other FUSE programs, the easiest would be 'sshfs', usage is similar to: $ sshfs username@my.observatory.org:~/somedir/ /mnt/test/ There may be some issue with permissions of the StreamStor kernel module. Confirm that you have 'rw' permission for all users: oper@Mark5-637% ll /dev/windrvr6 crw-rw-rw- 1 root root 254, 0 Sep 28 00:26 /dev/windrvr6 If there are other problems, post to the projects sourceforge forum or send an email to the developers. Include the output of: $ uname -a $ g++ --version $ fusermount --version $ /sbin/modinfo fuse