# Is it normal for /var/lib and /var/log to each take over 5G space?

**URL:** https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403
**Category:** Support
**Created:** [9 januari 2017 om 13:01 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403 "2017-01-09T13:01:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![snakeninny](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/snakeninny/32/115522_2.png) [@snakeninny](https://meta.discourse.org/u/snakeninny)
#### Post date: [9 januari 2017 om 13:01 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/1 "2017-01-09T13:01:20Z")

</div>

After running:

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

`ncdu` returns:

```plaintext
ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help                                                                                                                                                        
--- /var -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    7.8GiB [##########] /lib                                                                                                                                                                                        
    5.5GiB [######] /log
    3.4GiB [####] /discourse
  449.0MiB [] /cache
    8.7MiB [] /backups
   28.0KiB [] /spool
   24.0KiB [] /www
    8.0KiB [] /mail
    4.0KiB [] /tmp
e 4.0KiB [] /opt
e 4.0KiB [] /local
@ 0.0 B [] lock
@ 0.0 B [] run

```

```plaintext
ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help                                                                                                                                                        
--- /var/lib/docker/aufs -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                        /..                                                                                                                                                                                         
    5.1GiB [##########] /diff
    1.8GiB [###] /mnt
   48.0KiB [] /layers

```

```plaintext
ncdu 1.10 ~ Use the arrow keys to navigate, press ? for help                                                                                                                                                        
--- /var/log/nginx -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
                        /..
    4.5GiB [##########] access.log.1                                                                                                                                                                               
  870.1MiB [#] access.log.2.gz
   10.6MiB [] error.log.1
    6.8MiB [] error.log.4.gz
    5.7MiB [] error.log.5.gz
    5.2MiB [] error.log.8.gz
...

```

Seems to me that the diff and log are taking too much space. Is that normal?

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [9 januari 2017 om 13:48 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/2 "2017-01-09T13:48:00Z")

</div>

> [@snakeninny](#):
>
> Seems to me that the diff and log are taking too much space. Is that normal?

`/var/lib/docker/aufs` holds the disk of your docker image, so yes, that is normal, there is an entire linux there.

`/var/log/nginx` hold every request that hits your forum, so it will be bigger the more access you have. However it rotates for you.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [9 januari 2017 om 21:39 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/3 "2017-01-09T21:39:42Z")

</div>

That’s `/var/log/nginx` on the host (I presume), that isn’t a standard setup, so it’s outside the scope of what we can offer suggestions on.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [9 januari 2017 om 21:57 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/4 "2017-01-09T21:57:01Z")

</div>

> [@mpalmer](#):
>
> That’s /var/log/nginx on the host (I presume), that isn’t a standard setup, so it’s outside the scope of what we can offer suggestions on.

We are mounting nginx log to `/var/log` now:

> <https://github.com/discourse/discourse_docker/blob/master/samples/standalone.yml#L77-L79>

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [9 januari 2017 om 22:03 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/5 "2017-01-09T22:03:33Z")

</div>

That’s `/var/log` in the guest, and it gets mounted to `/var/discourse/shared/standalone/log/var-log` in the host, so the Discourse nginx logs are part of the 3.4GiB shown for `/var/discourse`. Some other site is on the machine that’s generating so many logs.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [9 januari 2017 om 22:08 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/6 "2017-01-09T22:08:29Z")

</div>

Oh, true, it’s the inverse 😄

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [8 juni 2024 om 12:45 UTC](https://meta.discourse.org/t/is-it-normal-for-var-lib-and-var-log-to-each-take-over-5g-space/55403/7 "2024-06-08T12:45:01Z")

</div>

This topic was automatically closed after 2706 days. New replies are no longer allowed.
