Date: Wed, 29 Jul 1998 16:47:08 -0400 (EDT) From: jim@reptiles.org (Jim Mercer) To: freebsd-hackers@FreeBSD.ORG Subject: proposed modification to /sbin/mount Message-ID: <m0z1d7s-0007zYC@mailbox.reptiles.org>
next in thread | raw e-mail | index | archive | help
[ note: i am not subscribed to hackers@freebsd.org, and would appreciate a cc: jim@reptiles.org on any responses ] i just spent some time working out the dependencies of - /etc/hosts - ypbind (NIS hosts) - named - mountd - /etc/rc (mount -vat nfs) my religion dictates that i treat / and /usr as read-only partitions (well, with the exception of /etc and some symlinks for smail3). this religion has served me well when upgrading from release to release. upgrade process: #! /bin/sh kill (sendmail/smail-3) cd /sys/i386/conf config KERNEL cd ../../compile/KERNEL make depend make make install cd /usr/src make world cd /usr/local/src/smail-3 make install reboot works pretty good for me (only problem is integrating new /etc/stuff, but the previous release generally has enough to get the machine booted). my problem is that i have several hosts, which have certain dependancies. as such, i am having some difficulties getting the systems to come up efficiently if they all get power cycled at the same time. i configured all of my nfs mounts to be -b,-i,-s, such that they shouldn't wait on other things before moving along in /etc/rc. unfortuneately, there are still dependencies on named and ypbind, which may or may not be running at the proper time. not to mention the dependencies of mountd and nfsd. for the time being, i have moved "mount -vat nfs" in /etc/rc to the bottom, just before /etc/rc.local is called. this has made things work ok, but it has caused me to spit in the face of my god, in that next time i upgrade, i need to remember to make the same adjustment to /etc/rc. anyways, i got to thinking about how to do this without modifying /etc/rc. one thing i could do is mark all of my nfs mounts as noauto, and then stick a script in /usr/local/etc/rc.d which mounts them at the end of /etc/rc. unfortunately, i have other nfs mounts which are marked noauto, which i don't want mounted on boot (moreso for convienience, or security). this would make the /usr/local/etc/rc.d script rather ugly, and probably dependent on some other table which would mean more maintenance. i could put my nfs hostnames in /etc/hosts or in NIS hosts, but, again, this means more maintenance and/or version skew if i don't keep the hosts file in sync with my DNS. ok, for the meat of my proposal: in /etc/fstab there is a field, pass, which is intended to optimize the fsck passes on boot up. obviously, for NFS (and other filesystems), this field is not used. however, if we modified /sbin/mount such that it had an additional argument to specify a pass #, then we could sprinkle a number of mount -vat nfs type calls in /etc/rc, and have file systems mounted at various points. the modification would be backwards compatable, in that if it is not specified, then the pass field is ignored. it can be done such that the pass field is only used for specific file system types. i gave some thought to having /sbin/mount pass the flag to the next mount process (ie. /sbin/mount_nfs), but that would require changes to each of the sub mount programs, which could cause future problems. in any case, if the powers that be are interested in this, i am willing to put the effort in to make the changes and submit it for review/inclusion in the distribution. if not, then i'll focus my efforts on making a grotty /usr/local/etc/rc.d script. 8^( -- [ Jim Mercer Reptilian Research jim@reptiles.org +1 416 410-5633 ] [ The telephone, for those of you who have forgotten, was a commonly used ] [ communications technology in the days before electronic mail. ] [ They're still easy to find in most large cities. -- Nathaniel Borenstein ] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0z1d7s-0007zYC>