From owner-freebsd-stable@FreeBSD.ORG Sat Nov 4 12:40:24 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 6861F16A5A1 for ; Sat, 4 Nov 2006 12:40:24 +0000 (UTC) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA26E43D53 for ; Sat, 4 Nov 2006 12:40:19 +0000 (GMT) (envelope-from ohartman@mail.zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost1.zedat.fu-berlin.de (Exim 4.62) for freebsd-stable@freebsd.org with esmtp (envelope-from ) id <1GgKoT-0007Dp-Ea>; Sat, 04 Nov 2006 13:39:53 +0100 Received: from e178061090.adsl.alicedsl.de ([85.178.61.90] helo=[192.168.1.128]) by inpost2.zedat.fu-berlin.de (Exim 4.62) for freebsd-stable@freebsd.org with esmtpsa (envelope-from ) id <1GgKoT-0006ir-AL>; Sat, 04 Nov 2006 13:39:53 +0100 Message-ID: <454C8A14.1010405@mail.zedat.fu-berlin.de> Date: Sat, 04 Nov 2006 13:39:48 +0100 From: "O. Hartmann" User-Agent: Thunderbird 1.5.0.7 (X11/20061029) MIME-Version: 1.0 CC: freebsd-stable@freebsd.org References: <20061103120052.75B4916A6D5@hub.freebsd.org> <000001c6ff95$dfcd6df0$0201a8c0@bedroom> <20061104123353.b9710e70.torfinn.ingolfsen@broadpark.no> In-Reply-To: <20061104123353.b9710e70.torfinn.ingolfsen@broadpark.no> X-Enigmail-Version: 0.94.1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Originating-IP: 85.178.61.90 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 12:40:24 -0000 Torfinn Ingolfsen wrote: > 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. > > You should also put /usr/src and /usr/obj on different devices, prefereably /usr/obj not on the system or any high I/O data device (if not on RAID). This speeds up buildworld! -- O. Hartmann Freie Universitaet Berlin Institut fuer Geowissenschaften Fernerkundung der Erde und Planeten Malteser-Str. 74 - 100/Haus D D-12249 Berlin Tel.: +49 (0) 30 838 70 508 FAX: +49 (0) 30 838 70 837