Bug 43167

Summary: Ability to have vnode based file systems mounted on boot
Product: Base System Reporter: lonewolf <lonewolf>
Component: confAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: lonewolf
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff
none
file.diff none

Description lonewolf 2002-09-21 14:00:15 UTC
While vn(4) based file systems offer great flexibility, the option to
mount such filesystem on boot is currently missing. There is no way of
getting vnconfig(8) to run in time to make the vn's available for mounting.
This is a shame as I needed/wanted that functionality today.

So I added it :)

I'm hoping you'll find this to be a useful addition to include in future
releases, or if nothing else, an inspiration for something even better.

Fix: I've tweaked /etc/rc and added two knobs to /etc/default/rc.conf to
provide the mechanism for running vnconfig(8), fsck:ing the fs'es,
and mounting them at boot time.

I'm not 100% the place in /etc/rc where I added it is the most optimal,
but it needs to be somewhere after having had NFS fs'es mounted (in case
the fs file is located on an NFS mount), and before starting up our own
nfsd (if we're sharing a "vn-fs"). As I put it, it's right before
network_pass2 gets invoked. It could possibly be moved to even earlier,
especially if we want to use it as /tmp and want it to be cleared on boot.
Not that I see much use for it, but maybe someone else might. I guess
right after the NFS mounts would be an okay location as well.

Cheers,
/Johny

Diffs inline below:
How-To-Repeat: Well.. just try and stick a /dev/vn0c line in your /etc/fstab and you'll
see how far you get on mounting that one at boot time. Which is to say
nowhere at all.
Comment 1 Matteo Riondato freebsd_committer freebsd_triage 2005-06-19 18:47:07 UTC
State Changed
From-To: open->closed

this is already possible using md(4) entries in fstab: 
md     /mnt    mfs     rw,-F/usr/tmp/md.fs     0       0 
See mount_mfs(8) for additional info.