What version of FreeBSD? (please report back the result of: uname -v )
You may want to take a quick gander on the command line: man growfs
Main Topics
Browse All TopicsCan anyone tell me how to resize a partition in FreeBSD. We recently ghosted a 36GB hard drive to a 72GB, and would like to maximize the use of the remaining disk.
Thanks in advance!
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I wouldn't suggest running growfs without reading up on it. man stands for manual, so man growfs will present you with the manual to read about it prior to using it. Though in your case, I am not sure that is what you want.
As an F.Y.I. release 4.8 is considered EOL and no longer supported by the FreeBSD team. However, for whatever reason you may have for continuing to use it, a few more questions need to be answered.
How is your disk currently setup? (at the prompt: df -h This is the command for display free (space) It will show you your current mount points)
Of those listed, which do you want to grow? Or do you simply want to create a new mount point and use some of the extra space for instance like /backup?
If you are looking to add a new slice and you are not very familiar with FreeBSD, then backup everything and try the following. (I'm doing this from memory, and it's been awhile since I've played with 4.8)
/stand/sysinstall at the command prompt will bring you to the FreeBSD installation and Configuration tool.
From there select, Configure
Then select Fdisk
You should then see the Fdisk partition editor. There you will see your disk (Possibly listed as ad0) If you have any unused space, then you can select that slice and hit C to "Create" a slice
Then, select the size you want, for example, 1024M would create a 1 gigabyte slice
Next screen you should see the default partition type of 165 which is a native FreeBSD slice. Click OK
Next you should be able to select your mount point, so for instance /backup
Then you will want to write your changes with w
When you are done with that, you may, again-my memory is a bit hazy, need to edit your fstab so that it mounts the newly created slice on your next boot or with the mount command. To do so:
(Be careful here)
vi /etc/fstab
then add your newly created /backup. It will be something similar to:
# Device Mountpoint FStype Options Dump Pass#
(other mountpoints will be listed here)
/dev/ad0s1e /backup ufs rw 2 2
Your device setting probably won't be /dev/ad0s1e just take a note of which disk and slice while you are in Fdisk under /stand/sysinstall.
man fstab at the shell to understand each of the above settings like device, mountpoints, FStype, etc.
Here is how my disk is set up:
Filesystem Size Used Avail Capacity Mounted on
/dev/da0s1a 126M 35M 81M 30% /
/dev/da0s1f 252M 31M 201M 13% /tmp
/dev/da0s1g 29G 12G 14G 47% /usr
/dev/da0s1e 252M 115M 116M 50% /var
procfs 4.0K 4.0K 0B 100% /proc
I would like to grow the /usr partition to use the remaining unused partition, if possible.
There is unfortunately no "easy" way to do this.
You do have a few options though. The first is to use growfs, which is quite involved and due to the number of variables, far too difficult to post step by step instructions for, not to mention it would be somewhat risky on your older install of 4.8 as it has since matured from the 4.8 days and the filesystem would be at risk of corruption(though this risk is not as bad as it once used to be)
Another option would be to simply add another disk to the system following my instructions in the previous post.
Another option would be to grab another drive of the same size or larger and follow the instructions here to copy the existing install to another drive-sizing the partitions on the new drive to take advantage of the greater space:
http://unixarticles.com/ar
Those instructions are for 5.4 but should work well enough for you.
If you do end up copying the system to a new drive, consider running FreeBSD 6.2 and migrating whatever you are running on your 4.8 box. Unless there is a reason to run 4.8 (Such as a port that is no longer available or a program that is no longer supported and therefore your box must be 4.8) if this is an internet connected box, there are probably a number of vulnerable services on your 4.8 box and upgrading to 6.2 would give you not only a more secure box, but access to newer technologies and a greater library of software which would be better all around.
Again, there is no real "easy" way to do this due to the way the OS sits on the disk. However the tools do exist, but do require a fairly strong skill set due to the number of variables that exist. If it were me, even though I have used FreeBSD for years, I would probably opt for adding a second disk, or using the copy method.
Business Accounts
Answer for Membership
by: uetian1707Posted on 2007-02-16 at 22:25:03ID: 18554170
Hi,
rcelMoolen aar
Please read this:
http://wiki.freebsd.org/Ma