From owner-freebsd-stable Sat Oct 27 10:38:42 2001 Delivered-To: freebsd-stable@freebsd.org Received: from dc-mx04.cluster1.charter.net (dc-mx04.cluster0.hsacorp.net [209.225.8.14]) by hub.freebsd.org (Postfix) with ESMTP id 83BA337B403 for ; Sat, 27 Oct 2001 10:38:38 -0700 (PDT) Received: from [24.158.214.244] (HELO gforce.johnson.home) by dc-mx04.cluster1.charter.net (CommuniGate Pro SMTP 3.4.6) with ESMTP-TLS id 43515180; Sat, 27 Oct 2001 13:44:51 -0400 Received: (from glenn@localhost) by gforce.johnson.home (8.11.6/8.11.6) id f9RHcYT00678; Sat, 27 Oct 2001 12:38:34 -0500 (CDT) (envelope-from glenn) From: Glenn Johnson Date: Sat, 27 Oct 2001 12:38:34 -0500 To: Peter Jeremy Cc: stable@FreeBSD.ORG Subject: Re: dirpref gives massive performance boost Message-ID: <20011027123834.A587@gforce.johnson.home> References: <20010928141246.A15515@xor.obsecurity.org> <20010928232009.A29187@libero.sunshine.ale> <20010928142611.A15946@xor.obsecurity.org> <20011024074436.A36730@gsmx07.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011024074436.A36730@gsmx07.alcatel.com.au> User-Agent: Mutt/1.3.23i Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wed, Oct 24, 2001 at 07:44:36AM +1000, Peter Jeremy wrote: > 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. I followed this procedure for my root filesystem. However, my system always boots with ad0s1b as root now. The system still says that ad0s1b is used for swap. Here is my /etc/fstab: # Device Mountpoint FStype Options Dump Pass# /dev/ad0s1a / ufs rw 1 1 /dev/ad0s1b none swap sw 0 0 /dev/ad0s1e /var ufs rw 2 2 /dev/ad0s1f /usr ufs rw 2 2 /dev/ad0s2 /shuttle ext2fs rw,noauto 0 0 /dev/acd0c /cdrom cd9660 ro,noauto 0 0 proc /proc procfs rw 0 0 linprocfs /compat/linux/proc linprocfs rw 0 0 Here is the output of mount: /dev/ad0s1b on / (ufs, local, soft-updates) /dev/ad0s1e on /var (ufs, local, soft-updates) /dev/ad0s1f on /usr (ufs, local, soft-updates) procfs on /proc (procfs, local) linprocfs on /usr/compat/linux/proc (linprocfs, local) Here is the output of swapinfo: Device 1K-blocks Used Avail Capacity Type /dev/ad0s1b 527896 0 527896 0% Interleaved What do I need to do to fix this? Thanks. -- Glenn Johnson glennpj@charter.net To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message