Date: Sat, 27 Oct 2001 12:38:34 -0500 From: Glenn Johnson <glennpj@charter.net> To: Peter Jeremy <peter.jeremy@alcatel.com.au> Cc: stable@FreeBSD.ORG Subject: Re: dirpref gives massive performance boost Message-ID: <20011027123834.A587@gforce.johnson.home> In-Reply-To: <20011024074436.A36730@gsmx07.alcatel.com.au> References: <20010928141246.A15515@xor.obsecurity.org> <20010928232009.A29187@libero.sunshine.ale> <20010928142611.A15946@xor.obsecurity.org> <20011024074436.A36730@gsmx07.alcatel.com.au>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011027123834.A587>