From owner-freebsd-questions@FreeBSD.ORG Tue Dec 5 17:15:34 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2723E16A492 for ; Tue, 5 Dec 2006 17:15:34 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout3.cac.washington.edu (mxout3.cac.washington.edu [140.142.32.166]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FAF043CC0 for ; Tue, 5 Dec 2006 17:14:40 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout3.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB5HFJZO000833 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 5 Dec 2006 09:15:19 -0800 X-Auth-Received: from [128.208.5.99] (nilakantha.cs.washington.edu [128.208.5.99]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW06.09) with ESMTP id kB5HFIBj016747 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 5 Dec 2006 09:15:19 -0800 Message-ID: <4575A928.7090509@u.washington.edu> Date: Tue, 05 Dec 2006 09:15:20 -0800 From: Garrett Cooper User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <499c70c0612042333k48ee9ec6n4cec1d7a89192071@mail.gmail.com> <20061205165431.GC34126@gizmo.acns.msu.edu> In-Reply-To: <20061205165431.GC34126@gizmo.acns.msu.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.2.2.285561, Antispam-Engine: 2.5.0.283055, Antispam-Data: 2006.12.5.85432 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Subject: Re: How can I repartition my drive? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Dec 2006 17:15:34 -0000 Jerry McAllister wrote: > On Tue, Dec 05, 2006 at 10:33:54AM +0300, Abdullah Al-Marrie wrote: > > >> Hello, >> >> How can I repartition my drive? I already have the hd dedicated for >> FreeBSD and 6.2-RC1 is installed. >> >> Is there away to make /var ..etc without reinstalling the OS? >> > > Well, I don't know what you mean by making /var ..etc, but there > are things to do if you need to move some things to shift them > to where there is more space. For this you do not repartition, > but just move certain directory trees and then make symbolic links. > > Here is an example. Let's say you have a typical setup with one > large /home file system that has lots of spare space, but you have > begun to fill /var because you have lots of stuff in /var/log and /var/spool. > So, you want to move the contents of /var/log and /var/spool in to > the /home space where they have room to grow. Do something like this: > > (While logged in as root - or booted to single user [preferred]) > cd /var/log > tar cvpf /home/log.tar * > cd /var/spool > tar cvpf /home/spool.tar * > cd /home > mkdir var.log > mkdir var.spool > cd var.log > tar xvf ../log.tar > cd ../var.spool > tar xvf ../spool.tar > cd /var > mv log log-old > ln -s /home/var.log log > mv spool spool-old > ln -s /home/var.spool spool > > Now, just check things out to make sure it is all OK. > cd /var/log > pwd (should display /home/var.log) > ls (should have the right stuff for log in it) > cd /var/spool > pwd (should display /home/var.spool) > ls (should have the right stuff for spool in it) > > If all is well, clean up. > cd /var > rm -rf log-old > rm -fr spool-old > cd /home > rm log.tar > rm spool.tar > > That will leave space in /var and give log and spool to work > The same type of thing can be done with other directories in overloaded > file systems if you have room for them elsewhere. Just don't do it for > some things like /etc or /sbin that need to stay in root. > > There is something called growfs, but it is only useful if you have > empty unallocated space right next to the partition you want to expand. > That is rarely the case. Most people put one partition right after > the other without leaving wasted space in between. > > There are also some other utilities that claim to be able to mush FreeBSD > (as well as other types) partitions around, but I have not heard much about > them. Most disk partition management utilities actually work on Microsoft > partitions which are what FreeBSD calls slices. They do not know anything > about FreeBSD partitions - which are actually subdivisions of slices. > > So, if you do not have the room to do the move and symlink process I > describe above, then, you are probably needing to look at buying larger > disk. > > Happy disk management, > > ////jerry > > >> Thank you, >> >> Abdullah >> Arab Portal >> http://www.WeArab.Net/ >> If you don't have any free partition space, you will need to backup a partition and delete it to resize things on your disk using sysinstall, which may require that you backup your entire disk and reinstall from scratch. For resizing NTFS partitions (if your system's dual-boot): . Googling for "resize {filesystem type}" will yield the answers to most questions that you might have about resizing any particular filesystem partition that you may have, but UFS2 support isn't available IIRC.. -Garrett