# Can't install Discourse with only 10 GB disk, run out of space

**URL:** https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149
**Category:** Self-hosting
**Tags:** docker, server-resources
**Created:** [22.Май.2015 19:27:54 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149 "2015-05-22T19:27:54Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 19:27:54 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/1 "2015-05-22T19:27:54Z")

</div>

I’m trying to set up Discourse via Docker installation on a [ovh.com](http://ovh.com) VPS (VPS Classic 1, 10 GB HDD, 1 GB RAM).  
Sadly during bootstrapping Discourse at some point I always get `no space left on device`.

Before bootstrapping I had 8GB free space. This is really a lot. Is there a way to get the bootstrap finished without upgrading to a more expensive plan?

This is the last log:

```
I, [2015-05-22T18:42:35.120929 #43] INFO -- : Terminating async processes
I, [2015-05-22T18:42:35.121383 #43] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/9.3/bin/postmaster -D /etc/postgresql/9.3/main pid: 113
2015-05-22 18:42:35 UTC [113-2] LOG: received fast shutdown request
2015-05-22 18:42:35 UTC [113-3] LOG: aborting any active transactions
2015-05-22 18:42:35 UTC [120-2] LOG: autovacuum launcher shutting down
I, [2015-05-22T18:42:35.124212 #43] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 236
236:signal-handler (1432320155) Received SIGTERM scheduling shutdown...
2015-05-22 18:42:35 UTC [117-1] LOG: shutting down
236:M 22 May 18:42:35.333 # User requested shutdown...
236:M 22 May 18:42:35.347 * Saving the final RDB snapshot before exiting.
236:M 22 May 18:42:35.455 * DB saved on disk
236:M 22 May 18:42:35.456 # Redis is now ready to exit, bye bye...
2015-05-22 18:42:35 UTC [117-2] LOG: database system is shut down
FATA[0056] Error response from daemon: ApplyLayer exit status 1 stdout: stderr: write /var/www/discourse/tmp/cache/assets/production/sprockets/a3e726f9c4f9dc6b12348792c7793c2b: no space left on device

```

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 19:48:15 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/2 "2015-05-22T19:48:15Z")

</div>

This seems…unlikely. My discourse docker install only takes up 160-some-odd MB.

Can you paste the output of `df` and `du --summ -k /var/www/discourse` ?

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 19:58:49 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/3 "2015-05-22T19:58:49Z")

</div>

df:

```
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop11744p1 11220208 9382368 1313744 88% /
none 12276996 0 12276996 0% /sys/fs/cgroup
none 12276996 52 12276944 1% /run
none 12276996 0 12276996 0% /run/lock
none 12276996 0 12276996 0% /run/shm
none 12276996 0 12276996 0% /run/user
none 12276996 0 12276996 0% /dev/shm

```

and there’s no folder like `/var/www/discourse` (yet)

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 20:01:34 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/4 "2015-05-22T20:01:34Z")

</div>

So, to be clear, you’ve reset from the condition you pasted above, and removed `/var/www/discourse`?

If that’s the case, then I’m not sure why you think you have 8GB free. `df` shows that you have 9.3GB **used**. This does not surprise me. A 10GiB partition is tiny and more or less useless for anything except static sites (IMO).

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 20:30:38 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/5 "2015-05-22T20:30:38Z")

</div>

I just reinstalled the whole system. This is the output of `df`:

```
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop10158p1 11220208 964176 9731936 10% /
none 12276996 0 12276996 0% /sys/fs/cgroup
none 12276996 52 12276944 1% /run
none 12276996 0 12276996 0% /run/lock
none 12276996 0 12276996 0% /run/shm
none 12276996 0 12276996 0% /run/user
none 12276996 0 12276996 0% /dev/shm

```

I will run `./launcher bootstrap app` now which will clog the hdd as seen above.

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 20:43:01 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/6 "2015-05-22T20:43:01Z")

</div>

OK, yeah, that really ought to be plenty of room, I would think. But I haven’t watched disk usage DURING the install – all I did was check what it was on an already-installed system. Perhaps the install process produces a lot of detritus that gets cleaned up at the end?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22.Май.2015 20:46:20 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/7 "2015-05-22T20:46:20Z")

</div>

Here is disk space usage after a Docker install on Digital Ocean:

```
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 30830588 7049764 22191688 25% /
none 4 0 4 0% /sys/fs/cgroup
udev 498084 4 498080 1% /dev
tmpfs 101788 348 101440 1% /run
none 5120 0 5120 0% /run/lock
none 508940 1164 507776 1% /run/shm
none 102400 0 102400 0% /run/user

```

That’s 5.3% of the 30GB drive.

Here’s what a new DO droplet looks like at launch with nothing on it:

```
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 30830588 1625676 27615776 6% /
none 4 0 4 0% /sys/fs/cgroup
udev 498084 4 498080 1% /dev
tmpfs 101788 324 101464 1% /run
none 5120 0 5120 0% /run/lock
none 508940 0 508940 0% /run/shm
none 102400 0 102400 0% /run/user

```

Subtracting the new droplet state from the installed state, it **looks like a Discourse install takes 5,424,088 or 5.4 GB.**

(I also forgot that we set up a **2GB swap** as a part of the install on a 1GB droplet, so that might mean the Discourse usage is less..)

The 30GB drive goes from 6% used before the install to 25% used after the install.

It’s possible bootstrapping may take more temp disk space as stuff is built, though. The smallest DO instance is 20GB disk space so we we would not have seen an issue.

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 20:56:15 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/8 "2015-05-22T20:56:15Z")

</div>

So, I just redid the bootstrap on my “scratch-monkey” site, and there is a definite “surge” in disk usage during the phase the OP reports the error. Overall, the process of bootstrapping kicked disk usage up a net of +0.7GB, but surged to as much as +1.3GB, even though I already had a site installed!

I may take some time to spin up a 10GB VM and run through the process from scratch. But I guess what it comes down to is that I believe that 10GB may simply be too small, not so much to run Discourse as to bootstrap it.

---

<div class="post-metadata">

### Author: ![pl3bs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pl3bs/32/37266_2.png) [@pl3bs](https://meta.discourse.org/u/pl3bs)
#### Post date: [22.Май.2015 21:08:46 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/9 "2015-05-22T21:08:46Z")

</div>

I’ve installed Discourse on classic1’s with 10GB before. That seems to be your package. Not sure why you’re running out of disk space, that wasn’t an issue in my testing.

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 21:23:10 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/10 "2015-05-22T21:23:10Z")

</div>

Which OS did you choose? I had to choose `Docker on Ubuntu 14.04 Server (64 bits)` because of the old kernel.

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 21:26:57 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/11 "2015-05-22T21:26:57Z")

</div>

Fresh VM, 10GB disk, 2048GB RAM, 2CPUs, Ubuntu 15.04 (it was an ISO I had handy). Of course, this is a GUI installation, so there’s more disk space in use than there would be on a pure server install.

After first post-install boot:

```plaintext
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 8124856 3669648 4019448 48% /

```

After the `wget` phase:

```plaintext
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 8124856 3688048 4001048 48% /

```

Not much change. The clone doesn’t add much more, either:

```plaintext
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda1 8124856 3688952 4000144 48% /

```

Around the time Docker is done pulling its base:

```plaintext
/dev/sda1 8124856 4989052 2700044 65% /

```

After bundle

```plaintext
/dev/sda1 8124856 5615836 2073260 74% /

```

After assets

```plaintext
/dev/sda1 8124856 5800184 1888912 76% /

```

Then there’s a stage after `2015-05-22 21:24:15 UTC [75-2] LOG: database system is shut down`, when you can see a surge in storage – it went up to 81%

```plaintext
/dev/sda1 8124856 6169208 1519888 81% /

```

But when bootstrap was done:

```plaintext
/dev/sda1 8124856 5817308 1871788 76% /

```

Bottom line…I don’t know why @hedgehog’s disk is filling up, but this really **should** work in 10GB, actually!

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 21:36:35 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/12 "2015-05-22T21:36:35Z")

</div>

Thanks for all the hard work, guys.

These are the current results:

```
 time="2015-05-22T23:08:23+02:00" level=fatal msg="Error response from daemon: Untar exit status 1 write /usr/lib/git-core/git-sh-i18n--envsubst: no space left on device"
Your Docker installation is not working correctly

See: https://meta.discourse.org/t/docker-error-on-bootstrap/13657/18?u=sam
root@vps169825:/var/discourse# 2015 May 22 23:08:46 vps169825 fatal: Read from socket failed: Connection reset by peer [preauth]
2015 May 22 23:10:16 vps169825 fatal: Read from socket failed: Connection reset by peer [preauth]
2015 May 22 23:29:52 vps169825 fatal: Read from socket failed: Connection reset by peer [preauth]
^C
root@vps169825:/var/discourse# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/ploop10158p1 11220208 11203728 0 100% /
none 12276996 0 12276996 0% /sys/fs/cgroup
none 12276996 52 12276944 1% /run
none 12276996 0 12276996 0% /run/lock
none 12276996 0 12276996 0% /run/shm
none 12276996 0 12276996 0% /run/user
none 12276996 0 12276996 0% /dev/shm

```

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 21:40:35 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/13 "2015-05-22T21:40:35Z")

</div>

@hedgehog This is a VPS Classic 1, yes? 10GB disk, 1GiB RAM? Did you add a swapfile? If so, how large?

---

<div class="post-metadata">

### Author: ![hedgehog](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hedgehog/32/107645_2.png) [@hedgehog](https://meta.discourse.org/u/hedgehog)
#### Post date: [22.Май.2015 21:44:03 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/14 "2015-05-22T21:44:03Z")

</div>

Yes, it is VPS Classic 1 with 10 GB disk and 1 GB RAM.  
You can’t add a swapfile to their VPS because they’re OpenVZ-based.

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 21:47:02 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/15 "2015-05-22T21:47:02Z")

</div>

Hm…then I’m at a bit of a loss for what might be devouring the extra disk space. You’re starting out with LESS disk space filled than I did in my VM, but my install completed…

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 21:53:55 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/16 "2015-05-22T21:53:55Z")

</div>

Just for kicks, I’m going to try again, scaling the machine more closely to the VPS Classic 1 specs (only 1 CPU, only 1 GiB of RAM). I’m not sure why RAM and CPU would make a difference in this situation, but it’s worth a try, and doesn’t take that long to set up.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [22.Май.2015 21:57:54 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/17 "2015-05-22T21:57:54Z")

</div>

OK, trying again with a 2GB RAM droplet so I don’t need a swapfile.

After basic OS provisioning (Ubuntu 14.04 LTS):

```
/dev/vda1 40188 1592 36532 5%

```

After installing docker / git / OS updates via [get.docker.io](http://get.docker.io):

```
/dev/vda1 40188 1651 36474 5%

```

After cloning git repo

```
/dev/vda1 40188 1652 36473 5%

```

After bootstrap

```
/dev/vda1 40188 3660 34464 10%

```

After starting the container

```
/dev/vda1 40188 3642 34483 10%

```

So 1592 - 3642 = 2050 or around 2GB. I would call it 5GB to be safe?

(One thing I am not sure about, during bootstrap disk usage may spike, so you may need more than that.)

That should fit on a 10GB instance, but you will be in trouble without swap on a 1GB RAM system anyway..

---

<div class="post-metadata">

### Author: ![pl3bs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pl3bs/32/37266_2.png) [@pl3bs](https://meta.discourse.org/u/pl3bs)
#### Post date: [22.Май.2015 22:07:25 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/18 "2015-05-22T22:07:25Z")

</div>

See post below, docker is now supported on newer openvz kernels.

---

<div class="post-metadata">

### Author: ![mshappe](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mshappe/32/104819_2.png) [@mshappe](https://meta.discourse.org/u/mshappe)
#### Post date: [22.Май.2015 22:15:47 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/19 "2015-05-22T22:15:47Z")

</div>

10GB disk, 1GB RAM, 1CPU, 15.04, no swap:

After wget:

```plaintext
/dev/sda1 9156984 3715188 4953604 43% /

```

After discourse\_docker clone:

```plaintext
/dev/sda1 9156984 3716092 4952700 43% /

```

After docker base:

```plaintext
/dev/sda1 9156984 5016224 3652568 58% /

```

After bundle

```plaintext
/dev/sda1 9156984 5621652 3047140 65% /

```

After assets

```plaintext
/dev/sda1 9156984 5737528 2931264 67% /

```

Peak during surge

```plaintext
/dev/sda1 9156984 6412816 2255976 74% /

```

After bootstrap:

```plaintext
/dev/sda1 9156984 5756740 2912052 67% /

```

So, yeah, this definitely works fine under the limitations described in an environment other than the actual VPS Classic 1 offering from OVH. Without starting my own instance there, however, I don’t think I could easily diagnose why this should be the case.

---

<div class="post-metadata">

### Author: ![pl3bs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pl3bs/32/37266_2.png) [@pl3bs](https://meta.discourse.org/u/pl3bs)
#### Post date: [22.Май.2015 22:27:12 UTC](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149/20 "2015-05-22T22:27:12Z")

</div>

Sorry on the road, but you’re limited to the host kernel on openvz, so even if you pick ubuntu 14.04 it’s really not the same thing. Curious you even got docker to install, but I bet your issue is with the old kernel and incorrectly showing up as a disk space limitation.

[Следующая страница](https://meta.discourse.org/t/cant-install-discourse-with-only-10-gb-disk-run-out-of-space/29149.md?page=2)
