# File system full FreeBSD in VirtualBox...



## exeter (Dec 4, 2019)

I installed FreeBSD in VirtualBox using the official FreeBSD 12.1 vmdk file. When I created a new user I got a file system full message. I can't find out how to increase the file system. Advice please. Thanks.


----------



## SirDice (Dec 4, 2019)

You probably have to resize the (virtual) disk first. Then you resize the partition, only when that's done can you resize the filesystem.


----------



## exeter (Dec 4, 2019)

Thanks for that. Unfortunately I can't find any instructions for resizing the disk image. Google has failed me again. Any ideas where I might look for instructions? Thanks.


----------



## SirDice (Dec 4, 2019)

exeter said:


> Google has failed me again.


I don't know which keywords you used but I found, literally, hundreds.



			virtualbox.org • View topic - How to resize a Virtual Drive


----------



## exeter (Dec 4, 2019)

Haha, that's excellent. My Google-fu is clearly in need of some enhancing. Thanks again.


----------



## SirDice (Dec 4, 2019)

Don't search specifically for the combination with FreeBSD. From Virtualbox's point of view it's irrelevant what the guest OS actually is. Resizing the virtual disk works exactly the same for any guest OS. What is different is what happens _after_ you resized the disk. Moving partitions around (or resizing) is different, FreeBSD uses gpart(8), Linux often uses fdisk, GParted or some other tool. On Linux you often use LVM to then enlarge the filesystem, on FreeBSD you use growfs(8) for UFS or use the autoexpand feature for ZFS.


----------



## Emrion (Dec 4, 2019)

Honestly, I think it's quickest and simplest to grab a FreeBSD iso file and do a fresh install with a virtual HDD of the appropriate size. Mostly if you begin with FreeBSD.


----------



## ralphbsz (Dec 4, 2019)

Maybe you should find out why the file system filled up? If there is a reason for that (for example some daemon process that creates too much output), then the enlarged file system might also fill up.


----------



## mhc (Jan 5, 2020)

Just bumped into the same issue.

Since im newish to BSD I have opted to install the virutalbox image to play with. The VB virtual disk is 4gb with 2.39gb used, so im thinking i need to grow the filesystem from witihin the os.

however,


Emrion said:


> Honestly, I think it's quickest and simplest to grab a FreeBSD iso file and do a fresh install with a virtual HDD of the appropriate size. Mostly if you begin with FreeBSD.



reckon i will try this


----------



## giffengrabber (Jan 5, 2020)

mhc said:


> reckon i will try this



I can also recommend installing from scratch. In my experience the installer was very quick and convenient.


----------



## Emrion (Jan 5, 2020)

When I was speaking of the "appropriate size", I meant 10 GiB at least. And if you want to have a future on this installation, go on 20 GiB; 50 GiB would be better. Do not forget that the real size taken by a dynamic virtual box disk isn't the maximum size unless you use all of its space. It grows as needed.


----------



## giffengrabber (Jan 5, 2020)

I recently installed 11.3-RELEASE in a VM. It contains the base and some more stuff, e.g. nginx. It weighs in at 2.7 GiB.



Emrion said:


> When I was speaking of the "appropriate size", I meant 10 GiB at least. And if you want to have a future on this installation, go on 20 GiB; 50 GiB would be better. Do not forget that the real size taken by a dynamic virtual box disk isn't the maximum size unless you use all of its space. It grows as needed.



Some of us have tiny drives though  My laptop has one SSD with a total of 121 GiB of storage. (I guess I should upgrade. Any day now...)


----------



## annika (Jan 21, 2020)

I had the same problem where the vhd was full on first boot. I bumped the size slightly in Windows during my first attempt to fix.

mount(8) shows that this is a UFS volume, and `gpart list` / `gpart show` say the default 3.0G filesystem is ada0p3 (disk ada0, index 3). This guide correctly said that the disk was listed as `[CORRUPT]` using gpart show, and that annotation was removed by running `gpart recover ada0`.

`gpart resize -i 3 ada0` was pretty noisy with "ATA Status Error" / "DRDY ERR" but the subsequent `service growfs onestart` seems to have worked fine. The filesystem is now resized as I would expect, given the size I set in the VirtualBox media manager.


----------



## someusermustbeunique (May 24, 2021)

Found this on Google search and solve this issue for me so:

Base on this article: https://www.vultr.com/docs/how-to-resize-a-disk-in-freebsd

Just try run: *service growfs onestart*

About resize Vm in VirtualboX or hyper-V is really easy and you can do it in GUI


----------



## Deleted member 30996 (May 27, 2021)

I got a kernel warning I was 3% over allotted HDD space when at the login terminal. I deleted my distfiles but that didn't clear up enough room.

So I used security/wipe, which is one of the first things I install before moving on to Xorg. I never really had the need to use it till then and it saved the day. I had some older Japanese movies in my Video directory so wiped all the .mp4 and .avi in the main Directory. Clearing enough space and not have touched the ones in sub-folders.


----------

