From owner-freebsd-questions@FreeBSD.ORG Sat Jul 10 23:23:58 2004 Return-Path: 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 1B61416A4CE for ; Sat, 10 Jul 2004 23:23:58 +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 B810D43D1D for ; Sat, 10 Jul 2004 23:23:57 +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 F276269A39; Sat, 10 Jul 2004 19:23:56 -0400 (EDT) Date: Sat, 10 Jul 2004 19:23:55 -0400 From: Bill Moran To: "Graham North" Message-Id: <20040710192355.00d8a12c.wmoran@potentialtech.com> In-Reply-To: <001d01c466ce$5d4ed4c0$627ba8c0@phoenix> References: <003e01c466bf$ff07e270$627ba8c0@phoenix> <20040710175008.30edb5fc.wmoran@potentialtech.com> <001d01c466ce$5d4ed4c0$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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Jul 2004 23:23:58 -0000 "Graham North" wrote: > Hello Bill: > > Thanks again for your help. > Does the line wrap look better now? I reduced from 76 to 66. You tell me. > Regarding inodes - /usr is 778MB and began with 99,838 inodes. > That would jive approximately with your million for 10G drive. It > now has 96M of free space but only 590 inodes remaining. This > heavy drain on inodes occurred when I downloaded the full Ports > tree a month or so ago. Not sure of the numbers but it was > clearly a TON of small files :--). > /usr is /dev/ad0s2g - I cannot remember from my install but think > that Windows may be the first partition..?? If so, you're probably hosed. To add space onto a partition, the available space needs to be immediately after it. Unless Partition Magic can move things around to put the free space immediately after the /usr partition, you're not going to be able to growfs it. Last time I used PM, it didn't have much understanding of BSD filesystems, that may have changed, but I don't know. > You said: > > _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. > > I suspect that since the Ports download is an infrequent deal and > most of my other files are much larger than the 500B or so of the > Ports that the problem will be alleviated by adding space with a > proportional number of nodes - (provided the next Ports update > does not leave me with tons of debris) Yes, the ports uses a lot of inodes, as it's a lot of directories and small files. I didn't know that partition was so small. > I will do some hunting for info on single user mode and growfs > before proceeding. Is it necessary for me to user single user > mode if I am the only user? I can of course restrict myself to a > single logon. You need to be in single-user so the /usr partition is unmounted. You can't growfs a mounted partition (unless something has changed?) If you can manage to get the /usr partition unmounted in multiuser mode, that will work as well. > Thanks again for such really good help. > Graham/ > > > ----- Original Message ----- > From: "Bill Moran" > To: "Graham North" > Cc: > Sent: Saturday, July 10, 2004 2:50 PM > Subject: Re: resizing my slices/partitions - was pruning the Ports > tree > > > > [Please wrap your lines around 72 chars or so ... see > > http://www.lemis.com/questions.html ] > > > > "Graham North" 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 > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" -- Bill Moran Potential Technologies http://www.potentialtech.com