RFE: mfs /var fixup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RFE: mfs /var fixup

ozone-3
given an /etc/fstab entry like so:

swap /var mfs -s32768,-P/.var,rw 0 0

the system will reach multiuser with /var mounted twice. this can be
remedied with a minor tweak of /etc/rc:

260c260,262
< mount /var >/dev/null 2>&1
---
> if [ ! -d /var/tmp ]; then
>       mount /var >/dev/null 2>&1
> fi

Reply | Threaded
Open this post in threaded view
|

Re: RFE: mfs /var fixup

Otto Moerbeek
On Mon, 30 Jan 2006, james ozone wrote:

> given an /etc/fstab entry like so:
>
> swap /var mfs -s32768,-P/.var,rw 0 0
>
> the system will reach multiuser with /var mounted twice. this can be
> remedied with a minor tweak of /etc/rc:
>
> 260c260,262
> < mount /var >/dev/null 2>&1
> ---
> > if [ ! -d /var/tmp ]; then
> >       mount /var >/dev/null 2>&1
> > fi

Non-unified diff, bah!

I think it is better to mark the filesystem noauto. Relying on the
contents is just a hack. This has been discussed previously; search
the archives, I think it was misc@.

        -Otto

Reply | Threaded
Open this post in threaded view
|

Re: RFE: mfs /var fixup

ozone-3
In reply to this post by ozone-3
> I think it is better to mark the filesystem noauto. Relying on the
> contents is just a hack. This has been discussed previously; search
> the archives, I think it was misc@.

thanks. i thought about that after sending the mail (of course), it's
not "correct" to fudge startup scripts, doing so is often a symtom...

this RFE should really read "please add the following paragraph to the FAQ":

--- faq14.html.old      2006-01-31 12:00:54.000000000 -0800
+++ faq14.html  2006-01-31 12:13:59.000000000 -0800
@@ -2047,7 +2047,7 @@
 is being treated like any regular SCSI disk.
 
 <p>
-We will discuss two scenarios below.
+We will discuss three scenarios below.
 
 <h3>The device is new/empty and you want to use it with OpenBSD only</h3>
 
@@ -2080,6 +2080,27 @@
 # <b>mount /dev/sd0a /mnt/flashmem</b>
 </pre></blockquote>
 
+<h3>Using the device as a system disk</h3>
+
+Because flash memory devices have a limited number of write cycles, filesystems
+should be mounted using the <tt>noatime</tt> option, with <tt>/var</tt> and
+<tt>/tmp</tt> created in memory by <tt>mount_mfs</tt>.
+An example <tt>/etc/fstab</tt>:
+
+<blockquote><pre>
+/dev/wd0a / ffs rw,noatime 1 1
+swap /tmp mfs -s65536,rw 0 0
+swap /var mfs -s32768,-P/.var,rw,noauto 0 0
+</pre></blockquote>
+
+The stock <tt>/var</tt> is renamed to <tt>/.var</tt>, which is then used to
+populate the mfs <tt>/var</tt> filesystem when it is created. Note that this
+can be an extremely useful hack in situations where the BIOS does not
+understand how to boot from an obscure or unsupported storage device.
+(The Sun Ultra5/10 machines, at least, are known to boot happily from
+CompactFlash cards given the proper adaptor; once the kernel is loaded,
+any supported PCI interface should work, even if it doesn't have OpenFirmware.)
+
 <h3>You received the memory device from someone with whom you want to exchange data</h3>
 
 <p>