From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 21:50:11 2004 Return-Path: <owner-freebsd-questions@FreeBSD.ORG> Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4982D16A4CE for <freebsd-questions@freebsd.org>; Sat, 10 Jul 2004 21:50:11 +0000 (GMT) Received: from internet.potentialtech.com (h-66-167-251-6.phlapafg.covad.net [66.167.251.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F34E43D41 for <freebsd-questions@freebsd.org>; Sat, 10 Jul 2004 21:50:11 +0000 (GMT) (envelope-from wmoran@potentialtech.com) Received: from working.potentialtech.com (pa-plum-cmts1e-68-68-113-64.pittpa.adelphia.net [68.68.113.64]) by internet.potentialtech.com (Postfix) with ESMTP id 0D32B69A39; Sat, 10 Jul 2004 17:50:09 -0400 (EDT) Date: Sat, 10 Jul 2004 17:50:08 -0400 From: Bill Moran <wmoran@potentialtech.com> To: "Graham North" <graham.north@telus.net> Message-Id: <20040710175008.30edb5fc.wmoran@potentialtech.com> In-Reply-To: <003e01c466bf$ff07e270$627ba8c0@phoenix> References: <003e01c466bf$ff07e270$627ba8c0@phoenix> Organization: Potential Technologies X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: resizing my slices/partitions - was pruning the Ports tree X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions <freebsd-questions.freebsd.org> List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe> List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions> List-Post: <mailto:freebsd-questions@freebsd.org> List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help> List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, <mailto:freebsd-questions-request@freebsd.org?subject=subscribe> X-List-Received-Date: Sat, 10 Jul 2004 21:50:11 -0000 [Please wrap your lines around 72 chars or so ... see http://www.lemis.com/questions.html ] "Graham North" <graham.north@telus.net> wrote: > Hello all: > > I would like to expand my FreeBSD partion on the hard drive of which it only > has 60%. > The rest of the HD holds an old installation of Win98. > > When I first installed FBSD 4.8 I used Partition Magic to carve off 1.2G of a > 2.0G HD and give me dual boot capability so as to retain the Win98. After > recently installing a full ports tree I find that my FBSD /usr slice is > almost out of file handles. This is very unusual. There are generally more than enough inodes so that you don't run out of inodes before you run out of space. Did you use custom options to newfs when you created the filesystem? Do you have a TON of small files? You may want to just ckeck the filesystem and see what's eating up all the inodes to make sure it isn't something you can just delete. My /usr filesystem is 10G, and the defaults created over 1 million inodes. I'm using 2.7G and 170,000 inodes, which means I'll run out of space when I still have 1/2-million free inodes. > Of course I can blow everything away, reformat and re-install, but my > preference would be to: > 1) shutdown > 2)use my partion magic boot disk to reformat the 800MB windows partion > 3)use sysinstall to expand my /usr slice, maybe even resize some of the others > > Perhaps I can do this all with sysintall without even shutting down? I have > not used that program since my original install 6 months ago so am not sure > of its capabilities, weaknesses and strengths. You've got the right idea, but you're a little off. _Assuming_ your Windows partition is the last partition on the HDD, and the /usr partition is second to last, the following will work: 1) BACK UP any important data ... this procedure is easy to screw up! 2) Use PM or something similar to remove the Win partition and expenad the BSD partition to take up the space used by Win. You can also use BSD's disklabel and related utilities to do this (in single-user mode). 3) Boot FreeBSD into single-user mode 4) Use growfs to increase the size of the /usr filesystem to take up the partition. Since inodes are laid out in as a ration of #inodes/block, newfs will add more inodes in ration to the amount of space added. My point is that if you continue to use the filesystem in this manner, you're still going to run out of inodes before you fill the drive (even with the increased space). Although, this is a valid short-term fix that will provide you with more inodes. Depending on what you want to accomplish (long term) you may want to take the time now to backup this filesystem and re-newfs it with a value for -i that's appropriate. See the man page for newfs for more details. -- Bill Moran Potential Technologies http://www.potentialtech.com