Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 24 Oct 2001 07:44:36 +1000
From:      Peter Jeremy <peter.jeremy@alcatel.com.au>
To:        stable@FreeBSD.ORG
Subject:   Re: dirpref gives massive performance boost
Message-ID:  <20011024074436.A36730@gsmx07.alcatel.com.au>
In-Reply-To: <20010928142611.A15946@xor.obsecurity.org>; from kris@obsecurity.org on Fri, Sep 28, 2001 at 02:26:11PM -0700
References:  <20010928141246.A15515@xor.obsecurity.org> <20010928232009.A29187@libero.sunshine.ale> <20010928142611.A15946@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2001-Sep-28 14:26:11 -0700, Kris Kennaway <kris@obsecurity.org> wrote:
>On Fri, Sep 28, 2001 at 11:20:09PM +0200, Alessandro de Manzano wrote:
>> On Fri, Sep 28, 2001 at 02:12:46PM -0700, Kris Kennaway wrote:
>> 
>> > Just a note to those who have updated to 4.4-STABLE that it's well
>> > worth doing a backup + newfs + restore on all your UFS volumes.  The
>> 
>> does the "newfs" step is necessary or just recommended for optimum
>> performance gain ?
>
>Well, you need to wipe the disk so that when you restore it can lay
>things out optimally from the start.

Note that it _is_ possible to do this on your root partition without
needing an additional boot disk, assuming your swap partition is bigger
that your root partition.  The sequence is roughly (all in single-user
before enabling swap starting with read-only root):

fsck -p
dd if=/dev/ad0s1a of=/dev/ad0s1b bs=64k
mount /dev/ad0s1b /mnt
mount -u /
ed /mnt/etc/fstab :: comment out swap and change root to /dev/ad0s1b
reboot
:: at the boot0 twiddle press space to get the prompt and boot
0,ad(0,b)/boot/loader
at the loader prompt, "boot -s"

The system should now come up with root on ad0s1b.

fsck -p
:: arrange a writable /tmp, either "mount -u /" or "mount /tmp" if it's not
:: swap-backed
newfs /dev/ad0s1a
mount /dev/ad0s1a /mnt
cd /mnt
dump 0f - / | restore rf -
rm restoresymtable
ed etc/fstab :: re-enable swap and change root back to /dev/ad0s1a
cd /
reboot

The system should now come up normally with root back on ad0s1a.

If you're using SCSI disks, replace "ad" with "da".

Usual caveats apply: YMMV.  Use at own risk.  Make sure you have
readable backups and a fixit disk in case things break.

Peter

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?20011024074436.A36730>