Reply
New Member
Posts: 36
Registered: ‎01-07-2012
Posts: 36
Registered: 01-07-2012

Unifi Controller is filling my drive!?

Hi,

Quick question here.

I was surprised to find my linux server had a full hard drive today, and I wondered what it was that was doing it.

after some poking around, this looked suspicious.

/var/lib/unifi$ du -m

1 ./devices/ap/00-27-22-50-6e-33
1 ./devices/ap
1 ./devices
1 ./backup
3073 ./db/journal
3281 ./db
3281 .


Hmm. So the /var/lib/unifi/db/journal directory is ~3GB in size...

Is this normal?

Let's see what's in it

/var/lib/unifi$ cd db/journal

/var/lib/unifi/db/journal$ ls -l


total 3145744
-rw------- 1 root root 1073741824 2012-01-22 15:58 j._0
-rw------- 1 root root 88 2012-01-22 15:58 lsn
-rw------- 1 root root 1073741824 2012-01-08 14:40 prealloc.1
-rw------- 1 root root 1073741824 2012-01-08 14:40 prealloc.2


So there are three files, exactly 1GB each in size here.


1.) Is this intended or a bug?

2.) Should I expect it to continue growing?

If its intended I may have to go drive shopping. My little server only has a small 8GB SSD in it.

For what its worth, Unifi Controller has only been installed on this server for two weeks, and it supports a relatively small network with only one AP and 9 clients.

Any help appreciated.

--Matt
Emerging Member
Posts: 74
Registered: ‎09-03-2011
Posts: 74
Kudos: 17
Registered: 09-03-2011

Re: Unifi Controller is filling my drive!?

Must be a glitch. I logged into one of my installs that has 38 aps, and total directory is 507mb. Its been online now for about 6 weeks. It started on the 1.2.1 at first and now its running 2.2.3 upgrading all the way.

-Tim
Ubiquiti Certified Administrator
New Member
Posts: 36
Registered: ‎01-07-2012
Posts: 36
Registered: 01-07-2012

Re: Unifi Controller is filling my drive!?

Must be a glitch. I logged into one of my installs that has 38 aps, and total directory is 507mb. Its been online now for about 6 weeks. It started on the 1.2.1 at first and now its running 2.2.3 upgrading all the way.

-Tim


What operating system/distribution are you running it on?

I've done some googling, and I'm starting to suspect this is related to 64bit instances of mongodb.

My server is runing 64bit Ubuntu.
New Member
Posts: 31
Registered: ‎11-13-2011
Posts: 31
Kudos: 2
Registered: 11-13-2011

Re: Unifi Controller is filling my drive!?

My system has been running for 3 months, 14 AP. 150MB.
- Windows 7 64bit
New Member
Posts: 36
Registered: ‎01-07-2012
Posts: 36
Registered: 01-07-2012

Re: Unifi Controller is filling my drive!?

My system has been running for 3 months, 14 AP. 150MB.

- Windows 7 64bit


Hmm.


Maybe 64bit Linux versions of MongoDB then...


Are old journals safe to remove?
Newbie
Posts: 1
Registered: ‎01-23-2012
Posts: 1
Registered: 01-23-2012

Re: Unifi Controller is filling my drive!?

Yes, you may remove the prealloc files but they will be recreated when mongodb restarts if the mongodb journaling option is enabled and the process determines that there will be a benefit on your system. This is detailed in the following link:

www.mongodb.org/display/DOCS/Journaling+Administration+Notes

For Ubuntu 11.10 64-bit installations the files are created, which means that a minimum of ~5-6 GB storage should be considered for this distribution if you are using a VM.
Regular Member
Posts: 730
Registered: ‎06-09-2009
Posts: 730
Kudos: 59
Solutions: 1
Registered: 06-09-2009

Re: Unifi Controller is filling my drive!?

Hi,

Quick question here.

I was surprised to find my linux server had a full hard drive today, and I wondered what it was that was doing it.

after some poking around, this looked suspicious.

/var/lib/unifi$ du -m

1 ./devices/ap/00-27-22-50-6e-33
1 ./devices/ap
1 ./devices
1 ./backup
3073 ./db/journal
3281 ./db
3281 .


Hmm. So the /var/lib/unifi/db/journal directory is ~3GB in size...

Is this normal?

Let's see what's in it

/var/lib/unifi$ cd db/journal

/var/lib/unifi/db/journal$ ls -l


total 3145744
-rw------- 1 root root 1073741824 2012-01-22 15:58 j._0
-rw------- 1 root root 88 2012-01-22 15:58 lsn
-rw------- 1 root root 1073741824 2012-01-08 14:40 prealloc.1
-rw------- 1 root root 1073741824 2012-01-08 14:40 prealloc.2


So there are three files, exactly 1GB each in size here.


1.) Is this intended or a bug?

2.) Should I expect it to continue growing?

If its intended I may have to go drive shopping. My little server only has a small 8GB SSD in it.

For what its worth, Unifi Controller has only been installed on this server for two weeks, and it supports a relatively small network with only one AP and 9 clients.

Any help appreciated.

--Matt


I am seeing the same disc usage numbers as you are with my Ubuntu 10.04 (Lucid) x64 controller - So yes, it is normal.


agsweeney@UniFi:/var/lib/unifi$ du -m db
1 db/_tmp
1 db/ace
3073 db/journal
3281 db


agsweeney@UniFi:/var/lib/unifi$ uptime
17:15:33 up 13 days, 15:11, 1 user, load average: 0.06, 0.09, 0.09




The fact that your install and mine have the same size journals leads me to believe that this is the limit that you would see.

I have (6) AP's and (28) connected users on this particular server.
SuperUser
Posts: 14,740
Registered: ‎06-23-2010
Posts: 14740
Kudos: 4537
Solutions: 65
Registered: 06-23-2010

Re: Unifi Controller is filling my drive!?

I'm running all 32 bit versions and haven't seen the issue - FWIW.
New Member
Posts: 15
Registered: ‎12-17-2014
Posts: 15
Registered: 12-17-2014

Re: Unifi Controller is filling my drive!?

Hi,

 

I'm new to the unifi controller (I have been using it for a month under a few different testing setups), and I have just run into this same issue with debian 7.7 and the unifi controller 4.2. My /var partition is 6GB and at 100% capacity caused (according to du) by mongodb and unifi journals.

 

Has anyone seen a recommended partition size for /var so that I will have no fear of being overrun by this issue (I would rather not have everything on a single partition).

 

thanks

josh

Regular Member
Posts: 361
Registered: ‎07-17-2013
Posts: 361
Kudos: 225
Solutions: 20
Contributions: 1
Registered: 07-17-2013

Re: Unifi Controller is filling my drive!?

it's always hard to recommend partition sizes given each server can be used for different purposes. However you can always get the directories to another partition and symlink them! Maybe you dont need to change your partitions, you just need to use Unix features to help you :manhappy:

Solutti Tecnologia Ltda - Goiânia/Goiás/Brazil
www.solutti.com.br

did my answer helped you ? if yes, i would love your kudos on it :manhappy:
New Member
Posts: 15
Registered: ‎12-17-2014
Posts: 15
Registered: 12-17-2014

Re: Unifi Controller is filling my drive!?

Thanks,

 

Since I am on the front end of this I was hoping for a bit of information that would help me so that I wouldn't have to go to symlinks so soon. I am looking to plan a well laid out partition scheme before we roll it out. :manhappy:

 

I just decided to do 20GB in my /var directory. I'll go to symlinks later.

 

thanks again

 

Regular Member
Posts: 361
Registered: ‎07-17-2013
Posts: 361
Kudos: 225
Solutions: 20
Contributions: 1
Registered: 07-17-2013

Re: Unifi Controller is filling my drive!?

UniFi controller does little to erase old data, so dont forget to get a prune script running on your crontab. Check it here:

 

http://community.ubnt.com/t5/UniFi-Controller-Installation/UniFi-Remove-prune-older-data-and-adjust-...

Solutti Tecnologia Ltda - Goiânia/Goiás/Brazil
www.solutti.com.br

did my answer helped you ? if yes, i would love your kudos on it :manhappy:
Established Member
Posts: 1,941
Registered: ‎03-11-2013
Posts: 1941
Kudos: 425
Solutions: 43
Registered: 03-11-2013

Re: Unifi Controller is filling my drive!?

If you don't need journalling, turn it off, or adjust its granularity.

 

People make a terrible fuss about quite small amounts of disk. We aren't living in 1983!

 

The MongoDB documentation is really easy to follow, you can alter the configuration file to get MongoDB to behave the way you wish.

 

R+C

Reply