Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Aug 2010 15:07:30 -0700
From:      mdf@FreeBSD.org
To:        Marcel Moolenaar <marcelm@juniper.net>
Cc:        FreeBSD Arch <freebsd-arch@freebsd.org>
Subject:   Re: RFC: enhancing the root mount logic
Message-ID:  <AANLkTikLd0-sLN=oxobC03yKfNcZ7mHguQNtooojOE=B@mail.gmail.com>
In-Reply-To: <AFBE2FCA-30A6-4E1D-A964-AC4DC4C843EB@juniper.net>

index | next in thread | previous in thread | raw e-mail

On Mon, Aug 23, 2010 at 2:30 PM, Marcel Moolenaar <marcelm@juniper.net> wrote:
> In embedded products, software is possibly installed as an image onto
> an actual storage device. This means that mounting the storage device
> as root is not enough to have a usable root file system. The rough
> draft below is an idea to enhance the root mount from having ad-hoc
> quirks to a well-defined and recursive mechanism to allow a wide-
> range of use cases.

I am not making any claims to the overall desirability of this, but as
a suggestion for the file format:

>   [devfs]      /.mount.conf:
>        ufs:/dev/da0
>        .ask
>        .wait 5
>        .onfail panic

To me, this should wait 0 seconds (or whatever the default is) until
after the .ask mount point has been tried.

I'd suggest something like:

   [devfs]      /.mount.conf:
        .wait 10
        ufs:/dev/da0
        # wait up to 10 seconds for ufs
        .wait 5
        .ask
        # wait up to 5 seconds for the prompt-returned filesystem
        .onfail panic

The two reasons for such a usage:

1) simplifies parsing, since the file only needs to be read to a mount
directive, not read in its entirety.
2) allows different timeouts for each root mount location

I could also imagine, instead, a .mount directive, so that all
"commands" start with a '.' which would be like:

.mount ufs:/dev/da0 8

which would be an 8 second timeout on the specified mount point.

Anyways, as a flexible mechanism this sounds reasonable.  I have no
idea how it compares to what other operating systems do, which is only
relevant insofar as making migration from another platform easier.

Thanks,
matthew


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTikLd0-sLN=oxobC03yKfNcZ7mHguQNtooojOE=B>