Both utilities work the same
virtualfs-xsmb --server server --share share [ --account account ] --mountdir mount_point
Virtualfs use the HOME/n directories to place its logical mount points. But it also use this directory to create sub-directories. This is done when one is changing its working directory inside one Virtualfs volume. Virtualfs creates a sub-directory there and change the process current directory. If the process starts new programs, they inherit the logical current working directory this way.
After a while, you may end up with many empty directory in HOME/n. By using the command
all sub-directory not currently used by any process (not the working directory of any process) are removed. This requires a kernel 2.2 though.
Virtualfs is a "personal" thing. Each user may have its own set of configuration files (mappings). These are the .aclfs, .litefs and .persmount for example). Those config files are read by each processes generally early at startup time. They are not read again later (this might change some day).
Some programs change identity. For example, ftpd (the ftp server) starts as root and then change to the user id of the logged client. By starting virtualfs with the --authdaemon, we are passing a directive to the various Virtualfs drivers to wait until the client is authenticated (the uid is not 0 anymore) to start normal operation.
By placing the following line in /etc/inetd.conf, we can use Virtualfs services (especially AclFS) in an ftp session.
ftp stream tcp nowait root /usr/bin/virtualfs virtualfs --authdaemon /usr/sbin/in.ftpd -l -a
(The line was folded in two lines for this document).
Note that for now we must place virtualfs calls here and there because of the experimental nature of virtualfs. In the future, we will have means to globally enable it. Another solution for inetd services would be to start inetd from virtualfs, so all process will share the ability to use it.
volume mount command ....
This was not that practical. The persmount driver was assuming that the real mount point was HOME/.n/volume all the time. The layout has been modified to accept the mount point as the second parameter.
volume mount_point command ...
The command is now optional. This can be use to create simple redirection. This has some advantage over a symbolic link. This allows you to set your working directory in a resource logically, yet the resource may be unmounted anytime. I am using this facility in combination with the kernel auto-mounter. I have .persmount line like this
So I can do the following sequence
cd cd n/machine/sub-dir # wait a while # and /n/machine is umounted by the kernel auto-mounter ls # it is mounted again
There are other usages I guess :-)