Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 May 2002 11:20:42 -0700
From:      "Kevin Oberman" <oberman@es.net>
To:        Nuno Teixeira <nunotex@pt-quorum.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: enable/disable softupdates in rc init idea 
Message-ID:  <20020514182042.874C75D06@ptavv.es.net>
In-Reply-To: Your message of "Tue, 14 May 2002 18:36:52 BST." <20020514173651.GA284@gw.tex.bogus> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Tue, 14 May 2002 18:36:52 +0100
> From: Nuno Teixeira <nunotex@pt-quorum.com>
> Sender: owner-freebsd-stable@FreeBSD.ORG
> 
> 
>     Hello to all,
>     
>     I'm looking for a solution to enable/disable softupdates without:
>     
>     	1. using single user mode
>     	2. changing filesystem status, e.g.:
>     
>     		mount -ufo ro <filesystem>
>         	tunefs -n enable <filesystem>
>         	mount -ufo rw <filesystem>
>     
>     1. is problematic for those who don't have console access to 
>     machine/server
>     
>     2. can result in several errors in filesystems like /var
>     
>     
>     To enable softupdates in a filesystem, we need to have a filesystem 
>     unmounted (or in reed-only mode) so I used rc script to enable it 
>     before the system mounts all filesystems.
>     
>     I've changed rc (line 217 - 4.6-PRERELEASE) to: 
>     
>     ### /etc/rc
>    
>     (...)
>     # If using diskless, run custom disk mounting function here
>     #         
>     if [ -n "${diskless_mount}" -a -r "${diskless_mount}" ]; then
>             sh ${diskless_mount}
>     else
>     # otherwise mount everything except nfs filesystems.
>             
>     + #SOFTUPDATES ENABLE/DISABLE BEFORE MOUNTING ALL FILESYSTEMS - 
>     +
>     +	case ${softupdates_enable} in
>     +	[Nn][Oo][Nn][Ee] | '')
>     +		# do nothing
>     +		;;
>     +	[Yy][Ee][Ss])
>     +		# enable softupdates in fs list
>     +		for sufs in ${softupdates_fs}; do
>     +			tunefs -n enable ${sufs}
>     +		done
>     +		;;
>     +	[No][Oo])
>     +		# disable softupdates in fs list
>     +		for sufs in ${softupdates_fs}; do
>     +			tunefs -n disable ${sufs}
>     +		done
>     +		;;
>     +	esac
>      
>             mount -a -t nonfs
>     fi
>     (...)
>         
>     and add 2 config lines to rc.conf:
>     
>     ### /etc/rc.conf
>         
>     + softupdates_enable="NONE"	# YES - Enable; NO - Disable; NONE - Nothing 
>     + softupdates_fs="/dev/ad0s1d /dev/ad0s1h"
>     
>     
>     It works ok but this method is stupid because we need to activate 
>     softupdates only once and not every time that we reboot/start the machine.
>     
>     Does anyone knows a better way of doing this?

OK. I'm a bit confused. Why do you need to be doing this? Turn on
softupdates on the various file systems when you install the
system. If it's already built, live with a single drop to single-user
mode and turn softupdates on.

The softupdates attribute is non-volatile. Turn it on and it stays on
until it's turned off.

R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman@es.net			Phone: +1 510 486-8634

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020514182042.874C75D06>