Submount version 0.9  February 27, 2004
Copyright (C) 2003-2004 Eugene S. Weiss <eweiss@sbclobal.net>

Installation:

Submount is composed of two parts, a kernel module called "subfs" and a user
program titled "submountd".  Both must be properly installed for submount to
work.  The software is contained in the two directories underneath the submount
directory.  To build and install the software, read the files titled "INSTALL"
in both directories.


Requirements:

You will need a 2.6.x kernel to use submount.  It should work with 2.6.0-test1
forward.


Usage:

Once the software is installed, and the kernel module is loaded, you can mount
a submount filesystem.

To mount a drive under subfs, use the usual syntax, except put subfs in the
filesystem type field, and add the option fs=<fstype> in the options list.

for example	mount -t subfs /dev/scd0 /mnt/cdrom -o fs=iso9660,ro
or for fstab	/dev/scd0 /mnt/cdrom subfs fs=iso9660,ro

I've copied the function to find the filesystem type by reading the superblock
from mount, so fs=auto will work.  It can, however, cause a noticeable pause,
particularly on floppies, so there is another method for using multiple
filesystems.  If a keyword is used in the fs= option, submountd will attempt to
mount filesystems from a list.  Currently there are two options:  fs=floppyfss
attempts vfat and ext2, and fs=cdfss tries iso9660 and udf.  Submountd will
strip the options codepage, iocharset and umask from filesystems that don't
take them, so these can be included in list mounts, or auto-detected mounts.

These fstab lines should work:

/dev/scd0 /mnt/cdrom subfs fs=cdfss,ro,iocharset=iso8859-1,umask=0 0 0
/dev/fd0 /mnt/floppy subfs fs=floppyfss,iocharset=iso8859-1,sync,umask=0 0 0

Another option is to use a colon separated list of filesystems:

/dev/scd0 /mnt/cdrom subfs fs=udf:iso9660,ro,iocharset=iso8859-1,umask=0 0 0

Once this is done, just access the mountpoint directory as usual.

As of version 0.6 there is some additional functionality available.  It is
possible to designate a program other than /sbin/submountd to handle the
mounting and unmounting.  To invoke this feature, add the option
"program=XXXXX" to the list of options, with XXXXX representing the full
path to the program.

A second client program has been included for the purpose of allowing submount
to be used with nfs and other network filesystems.  It works by calling the
standard /bin/mount and /bin/umount programs.  It is named "net-submountd"
and is installed by default in the /sbin directory.  It accepts the option
"interval=XX" where XX represents the time in seconds between attempts to
unmount the filesystem.  If it is not specified, the interval defaults to
15 seconds.

An example of an nfs share mounted with net-submountd fstab entry follows:

192.168.1.12:/myshare /mnt/myshare subfs \
fs=nfs,program=/sbin/net-submountd,interval=5,....[usual nfs options]

net-submountd is intended for use for simple network shares only, where
editing /etc/auto.master and related files are a hassle rather than an
opportunity to automate the configuration of many shares.  For complex
nfs setups automount is, and will continue to be the appropriate tool.
