The lofi(7d) driver is just a little bit to hard to use.
In particular we need to extend Solaris so that the following "just work":
# mount -F hsfs /path/to/mydvd.iso /mnt
This might require expanding a little bit so that it is more like this:
# mount -F lofi -o ro,fs=hsfs /path/to/mydvd.iso /mnt
This also implies that we need the ability to run umount and have the
lofi mapping go away as well - if it was created by running mount but
not if it wasn't created by a call to mount.
Simiarly we need the ability to have peristent mappings of
files to lofi device names so that we can name lofi devices in /etc/vfstab
in one, or both, of the following formats:
/dev/lofi/1 /dev/rlofi/1 /mydvd ufs 1 yes rw
/path/to/mydvd.iso - /mydvd lofi - yes ro,type=hsfs
The fbk driver (ftp://ftp.berlios.de/pub/schily/kernel/fbk) can already
do this but lofi(7d) is the one that is in Solaris and it should
learn how to do this.
The peristance mapping can probably be done in a new SMF service:
svc:/system/device/lofi:default. Getting the correct SMF dependency
tree setup could be tricky and might require the use of more than
one SMF service since we might need svc:/system/filesyem/local:default
on line to get access to the files yet we might also want the lofi
mounts to happen before svc:/system/device/local:default is marked as
online.
I'm missing the need for a vfstab entry of the first
form (/dev/lofi). Why wouldn't you always just use the
file path directly?