From owner-freebsd-questions Fri Feb 25 18: 7:42 2000 Delivered-To: freebsd-questions@freebsd.org Received: from cytosine.dhs.org (cx272244-a.orng1.occa.home.com [24.1.177.149]) by hub.freebsd.org (Postfix) with ESMTP id 246F037BC70 for ; Fri, 25 Feb 2000 18:07:38 -0800 (PST) (envelope-from bhishan@cytosine.dhs.org) Received: (from bhishan@localhost) by cytosine.dhs.org (8.9.3/8.9.3) id SAA07865 for freebsd-questions@freebsd.org; Fri, 25 Feb 2000 18:07:43 -0800 (PST) (envelope-from bhishan) From: Bhishan Hemrajani Message-Id: <200002260207.SAA07865@cytosine.dhs.org> Subject: Re: Re-size swap and /var To: freebsd-questions@freebsd.org Date: Fri, 25 Feb 2000 18:07:43 -0800 (PST) X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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? I have two IDE hard drives in my machine. One is 1.5gb and that is used for /usr and /. As far as I know the other drive is 500mb and is used for swap and /var. Is what I said right? --bhishan Previous message: If var and swap are next to each other on the disk then your job is simple. That assumes you have enough free space to store what's on /var while you re-size things. Maybe you have room on / or /usr? Maybe you don't need a separate /var at all? Output from the df command would help. Roughly: -------- Stop things from screwing with /var shutdown now (to single user) Store /var contents somewhere, maybe with: cd /var;tar -cvf //var.tar * Redo your disk partitions, maybe via /stand/sysinstall. cd /;umount /var /stand/sysinstall->Index->Partition... etc. (be sure /var gets a newfs) Modify /etc/fstab as needed. (Does /var need a different device?) Re-mount stuff. mount -a Restore stuff cd /var;tar -xpvf //var.tar Reboot reboot If /var and swap aren't next to each other or you don't have a then things could quickly get more complex. Can't be more specific without knowing your disk layout and usage. That's where the df output comes in. Say, I'll bet there's great stuff on this in The Complete FreeBSD. ISBN 1-57176-246-9 :) Dave On Fri, 25 Feb 2000, Bhishan Hemrajani wrote: > I currently have /var set to 404mb.. but that > seems to much. > > I only have 96m on swap. I was wondering if there > was anyway to change swap to 256m and have the > rest put back to /var. > > I'm not sure how to do this at all. I am also > not that good at Unix yet, so if you could go > step by step I would really appreciate it. > > --bhishan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message