On Wed, 24 Apr 2002, M. Warner Losh wrote:

> In message: <[EMAIL PROTECTED]>
>             "David O'Brien" <[EMAIL PROTECTED]> writes:
> : On Tue, Apr 23, 2002 at 12:19:58PM -0400, Robert Watson wrote:
> : > diskless_root_readonly="NO"               # Make it "YES" for readonly
> :
> : good.
> What's wrong with the current root_rw_mount knob?

It works just fine.

The original complaint was that Danny's patches _assume_ that the root is
going to remain R/O and just provide two ways of populating the MFS /etc,
rather than allowing for the case where the MFS /etc isn't required at
all. (actually, this is just reversing a recent obrien improvement to
rc.diskless1 that made the MFS /etc conditional - it's still automatic in
-stable and has been for a long while).  There isn't a problem with
controlling the root mount; diskless_root_readonly is a solution to a

The real problem is that (in the case where you want it) there is no one
good way of constructing the MFS /etc - there are lots of bad ways,
various of which have been committed to rc.diskless1 at different times,
and still more used privately:

   1) Create an MFS mounted on an arbitrary mountpoint, then use
      mount_null to install it over /etc when it's been populated.
      This was the original version when the support for read-only
      root appeared in rc.diskless back in 1999 (3.2-RELEASE).
      Gave problems because null mounts didn't (still don't?) work
      very well - mmap() caused panic for example.

   2) Copy the files out of /etc into /tmp, then mount the MFS
      directly on /etc and copy the files back again.
      This appeared in 2001 (4.3-RELEASE)

   3) Avoid the double copy on each boot by requiring the administrator
      to keep a copy in /conf/default/etc that can be copied directly to
      an MFS mounted on /etc.
      This appeared a couple of months later (4.4-RELEASE).

   4) Small performance improvement on 3) - use a gzipped CPIO archive
      if available, rather than copying lots of small files which
      can be slow over NFS.
      This has just recently been committed to -stable by Luigi.

   5) Danny's solution: Mount the MFS on /conf/etc, then use unionfs
      mounts to install it over /etc.  Does unionfs work any better
      than mount_null?

   6) My solution: Mount a second instance of the root FS on /conf/default
      then copy as in 3).  Avoids maintaining two copies of /etc, but
      only works on NFS and doesn't solve the performance problem.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to