[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenBSD and FS-Support (compiling kernel without support..)



owner-misc@openbsd.org wrote on 2003.09.29 19:18:18:
> MirBSD *does* have  this in its standard /etc/rc, as was I was
> told (and have since confirmed) by somebody off-list.
>
> It's  something that  I've already  added this  morning to  my own
> /etc/rc.local:
>
> # Disable hardware write cache (needed for softdep).
> if [ "$softdrives_ide" = NO ]; then
>    echo "rc: warning: you did not disable hardware write cache!"
>   elif [ "$softdrives_ide" != SCSI ]; then
>    echo "Disabling hard disc hardware write caches..."
>    for drv in ${softdrives_ide}; do
>       /sbin/atactl /dev/r${drv}c writecachedisable
>    done
> fi

I would do it in other manner:

sed -n 's,^/dev/\(wd[0-9]\)[a-z].*softdep.*,\1,p' </etc/fstab | sort | uniq

will give you list of wd? drives that contain filesystems with softdep in
use. then just go through the list in a ordinary for loop and disable write
cache. to switch it off, add softdrives_ide variable to rc.conf with only
value NO (no SCSI and warnings). the warning could be put in wd(4) and/or
mount besides softdep description.

> Details at:
>
>
http://mirbsd.bsdadvocacy.org/active/cvsweb.cgi/src/etc/rc?rev=1.10&conte
> nt-type=text/x-cvsweb-markup
>
> Cheers,
>
> b&
>
> --
> Ben Goren
>  mailto:ben@trumpetpower.com
>  http://www.trumpetpower.com/
>  icbm:33o25'37"N_111o57'32"W

--
Denis A. Doroshenko, GPRS engineer
d.doroshenko <at> omnitel <dot> net, +37069863486
Omnitel Ltd., Muitines Str. 35, LT-2600 Vilnius, Lithuania