From owner-freebsd-questions Sat Feb 26 0:20:49 2000 Delivered-To: freebsd-questions@freebsd.org Received: from boris.netgate.net (boris.netgate.net [204.145.147.154]) by hub.freebsd.org (Postfix) with ESMTP id D772337B598 for ; Sat, 26 Feb 2000 00:20:45 -0800 (PST) (envelope-from wellsian@caffeine.com) Received: from localhost (wellsian@localhost) by boris.netgate.net (8.9.3/8.9.3) with ESMTP id AAA27696; Sat, 26 Feb 2000 00:20:02 -0800 (PST) (envelope-from wellsian@caffeine.com) Date: Sat, 26 Feb 2000 00:20:02 -0800 (PST) From: wellsian X-Sender: wellsian@boris.netgate.net To: Bhishan Hemrajani Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Re-size swap and /var In-Reply-To: <200002260207.SAA07865@cytosine.dhs.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 25 Feb 2000, Bhishan Hemrajani wrote: > Here is an output of df: > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/wd0s1a 63503 21068 37355 36% / > /dev/wd0s1e 1478039 1042985 316811 77% /usr > /dev/wd1s1e 416961 7906 375699 2% /var > mfs:32 95263 6 87636 0% /tmp > procfs 4 4 0 100% /proc > > Yes, my swap and var are on the same drive. > This is my /etc/fstab file: > Device Mountpoint FStype Options Dump Pass# > /dev/wd1s1b none swap sw 0 0 > /dev/wd0s1a / ufs rw 1 1 > /dev/wd0s1e /usr ufs rw,userquota 2 2 > /dev/wd1s1e /var ufs rw,userquota 2 2 > /dev/wd1s1b /tmp mfs rw 0 0 > proc /proc procfs rw 0 0 > > So do I just follow your instructions and it will work? Well, sort of. But this is where it starts getting scary to answer. The more specific I get, and the less you know, the easier it is for you to blow something away and then it's my fault. Make printouts of your disk layouts and fstab before starting. Anyway, it looks like /dev/wd1s1b and /dev/wd1s1e are adjacent, and the amount currently on /var is minimal, which means you _should_ be able to do what I said earlier, backing up to /usr/var.tar. I'm not sure if freebsd is okay with you taking away swap after dropping into single user mode. I've done that plenty of times with other 'nixs but not freebsd, and I'd hate to see something die while you're in the middle. You may have to reboot to single user in that step before repartitioning with /stand/sysinstall->index->disklabel. That would make it something like: shutdown now cd /var && tar -cvf /usr/var.tar * ls -l /usr/var.tar (confirm it's about 8MB) reboot (at the countdown, hit a key and type "boot -s" at the prompt) mount (confirm only / is mounted) /stand/sysinstall->Index->label->wd1 (remove wd1s1b and wd1s1e and recreate with new sizes, in the same order, making sure to enable newfs for the new /var) mount -a (did it work? you should now have filesystems back online. If so...) cd /var && tar -xpvf /usr/var.tar (did it work? var should be restored.) reboot - you're done You're going to have to be daring and try it or wait for someone else to scream that I've forgotten something important. Hope not. In any case, the less you're comfortable here the more you should want to back things up first. Unwanted clean reinstalls are educational but rarely fun. Dave To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message