From owner-freebsd-stable@FreeBSD.ORG Sat Nov 4 11:34:04 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0C7F416A494 for ; Sat, 4 Nov 2006 11:34:04 +0000 (UTC) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1smout1.broadpark.no (osl1smout1.broadpark.no [80.202.4.58]) by mx1.FreeBSD.org (Postfix) with ESMTP id B08DF43DA6 for ; Sat, 4 Nov 2006 11:33:55 +0000 (GMT) (envelope-from torfinn.ingolfsen@broadpark.no) Received: from osl1sminn1.broadpark.no ([80.202.4.59]) by osl1smout1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with ESMTP id <0J87005A2ESHQD00@osl1smout1.broadpark.no> for freebsd-stable@freebsd.org; Sat, 04 Nov 2006 12:33:53 +0100 (CET) Received: from kg-work.kg4.no ([80.203.109.36]) by osl1sminn1.broadpark.no (Sun Java System Messaging Server 6.1 HotFix 0.05 (built Oct 21 2004)) with SMTP id <0J8700G1VESH9CA0@osl1sminn1.broadpark.no> for freebsd-stable@freebsd.org; Sat, 04 Nov 2006 12:33:53 +0100 (CET) Date: Sat, 04 Nov 2006 12:33:53 +0100 From: Torfinn Ingolfsen X-Face: "t9w2,-X@O^I`jVW\sonI3.,36KBLZE*AL[y9lL[PyFD*r_S:dIL9c[8Y>V42R0"!"yb_zN,f#%.[PYYNq; m"_0v; ~rUM2Yy!zmkh)3&U|u!=T(zyv,MHJv"nDH>OJ`t(@mil461d_B'Uo|'nMwlKe0Mv=kvV?Nh@>Hb<3s_z2jYgZhPb@?Wi^x1a~Hplz1.zH In-reply-to: <000001c6ff95$dfcd6df0$0201a8c0@bedroom> To: freebsd-stable@freebsd.org Message-id: <20061104123353.b9710e70.torfinn.ingolfsen@broadpark.no> MIME-version: 1.0 X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; i386-portbld-freebsd6.2) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20061103120052.75B4916A6D5@hub.freebsd.org> <000001c6ff95$dfcd6df0$0201a8c0@bedroom> Subject: Re: adding an extra hard disk and adding space to /usr X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Nov 2006 11:34:04 -0000 On Fri, 03 Nov 2006 17:17:33 -0500 Matt Smith wrote: > Hello all, > I have a machine that just had a new HD added to it as ad1 and I > want to ADD this new disk onto the already existing /usr partition. > What's the best and safest way to do it? In my experience, there are only a handful of directories in /usr that uses lots of disk space. And they are related to two things: - building the system (/usr/src and /usr/obj) - building ports (/usr/ports, more specifically /usr/ports/distfiles) Of course, YMMV. Anyway, it is quite easy to install the new disk under a new mountpoint, say .. /extra1 Then you can copy the data from the directories in question with your favorite combination of cp, tar or find / cpio. Example: /usr/ports/distfiles --> /etxtra1/distfiles /usr/src --> /extra1/usr/src /usr/obj --> /extra1/usr/obj (it is perhaps easier to just blow away obj and recreate it - your choice) and so on. Finally, you symlink the new directories to their old place using 'ln -s'. Note: I prefer to rename the old directory first instead of removing it, in case something doesn't work. After testing that the new setup works, you can safely remove the old renamed directories. Please also note that this is just one way of doing things - there are others. -- Torfinn