# Making use of added storage volumes

**URL:** https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060
**Category:** Self-hosting
**Tags:** hosting
**Created:** [October 4, 2016, 8:48am UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060 "2016-10-04T08:48:57Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [October 4, 2016, 8:48am UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/1 "2016-10-04T08:48:57Z")

</div>

For most VPS providers I’ve seen, if you need more storage space you either:

- Upgrade your whole VPS plan.
- Buy additional storage volumes.

Now if you are running out of disk space, but your CPU/RAM resources are plenty, the additional storage volumes are likely the more cost efficient option. But these appear as a new volume on your server, while Discourse keeps running on the original volume where you installed it in the first place.

I could not find a guide or documentation on best practices how to either move Discourse to the newly added larger volume or what is the best way to make use of the added capacity?

For example on Digital Ocean if you upgrade your VPS plan you generally get 2x CPU and RAM, but only 10/20GB increments in disk space.

---

<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: [October 4, 2016, 3:15pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/2 "2016-10-04T15:15:30Z")

</div>

Storage space for what? The database of users, posts, and replies? Or uploads and attachments?

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [October 4, 2016, 3:59pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/3 "2016-10-04T15:59:45Z")

</div>

Well, personally I always offload images/attachements to S3,so in my case we would be talking about base system and database. Low cost VPSs tend to come with tiny SSDs.

---

<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: [October 4, 2016, 4:22pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/4 "2016-10-04T16:22:04Z")

</div>

> [@ljpp](#):
>
> we would be talking about base system and database

At least on Digital Ocean that would be a 3x performance penalty

> [@Need a how-to guide for using DigitalOcean Block Storage for image uploads](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digialocean-block-storage-for-image-uploads/49535/10):
>
> The man makes a point. It appears to be less than 1/3 the speed on the simplest of benchmarks. (I checked and both the host and the storage are at SFO2.) root#:dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k 1024+0 records in 1024+0 records out 402653184 bytes (403 MB, 384 MiB) copied, 0.590498 s, 682 MB/s root#:dd if=/dev/zero of=/mnt/volume-sfo2-01/test conv=fdatasync bs=384k count=1k 1024+0 records in 1024+0 records out 402653184 bytes (403 MB, 384 MiB) copied, 1.99937 s, 201…

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [December 16, 2016, 3:25pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/5 "2016-12-16T15:25:56Z")

</div>

Coming back to this topic. I benchmarked ScaleWay’s 9.99€ plan…

[https://meta.discourse.org/t/the-cheapest-solution-for-hosting/24060/35?u=ljpp](https://meta.discourse.org/t/the-cheapest-solution-for-hosting/24060/35)

…and noticed that their nice 200GB storage capacity is actually delivered in two volumes:

- 50GB volume, where the OS is
- Additional 150GB

So what is the best practice to make use of the secondary 150GB volume?

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [April 28, 2017, 10:07am UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/6 "2017-04-28T10:07:37Z")

</div>

This question remains. I [benchmarked](https://meta.discourse.org/t/scaleway-review/40916/44) ScaleWays new intensive workload server, and seems like a viable option for Discourse hosting.

But again, theiy deliver the SSD storage as 50+150GB, so how to make use of the additional 150GB volume? By default Discourse-setup will install to the 50GB system volume.

This should be a trivial issue, but I’d need some practical guidance on best the approach? Installing Discourse to the additional volume would be the most straight forward way, even though it leaves some of the 50GB system volume unutilized.

@mpalmer?

---

<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: [April 28, 2017, 2:18pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/7 "2017-04-28T14:18:55Z")

</div>

> [@Need a how-to guide for using DigitalOcean Block Storage for image uploads](https://meta.discourse.org/t/need-a-how-to-guide-for-using-digialocean-block-storage-for-image-uploads/49535/15):
>
> I would recommend against symlinking, instead, copy images and amend your container config to point /shared/uploads at the correct location.

---

<div class="post-metadata">

### Author: ![ljpp](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ljpp/32/96506_2.png) [@ljpp](https://meta.discourse.org/u/ljpp)
#### Post date: [April 28, 2017, 3:53pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/8 "2017-04-28T15:53:01Z")

</div>

I usually offload uploads to S3 anyway. But how to install the base system to other than default location?

_Symlink_ might be an idea, but for a reason unknown @sam adviced against them.

---

<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: [April 28, 2017, 3:59pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/9 "2017-04-28T15:59:29Z")

</div>

You can:

- Clone discourse\_docker (usually `/var/discourse`) anywhere

- Point the shared folders to another file system (like on the linked topics)

- Change docker configs so `/var/docker/aufs` lands elsewhere.

This are the 3 changes that can be made to better use your disk space.

---

<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: [August 24, 2017, 10:22pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/10 "2017-08-24T22:22:27Z")

</div>

> [@ljpp](#):
>
> For example on Digital Ocean if you upgrade your VPS plan you generally get 2x CPU and RAM, but only 10/20GB increments in disk space.

Warning, we have found that the **add-on DO storage volumes are _half_ the speed of the base disk** :

```
root@vol:/# dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync
536870912 bytes (537 MB) copied, 1.72333 s, 312 MB/s

root@server:/var/discourse# dd bs=1M count=512 if=/dev/zero of=test conv=fdatasync
536870912 bytes (537 MB) copied, 3.03458 s, 177 MB/s

```

For reference a here are numbers from a modern consumer M.2 PCI SSD drive:

```
536870912 bytes (537 MB) copied, 0.564705 s, 951 MB/s

```

And a plain old consumer SATA SSD, but a good one, like the Samsung 950 pro.. though to be fair most name brand-ish SATA SSDs are close to this as it is a mature market:

```
536870912 bytes (537 MB) copied, 1.20895 s, 444 MB/s

```

I looked up old results, and ye olde spinning rust hard drives deliver anywhere from 50 MB/sec to 110 MB/sec.

---

<div class="post-metadata">

### Author: ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)
#### Post date: [August 25, 2017, 1:09pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/11 "2017-08-25T13:09:52Z")

</div>

The difference is much worse. `dd` is not a good tool to measure performance if you want the results to be anything near what is happening in real life. `dd` performs a long sequential write, and that is not what your Discourse server is doing.

We use `fio` for benchmarking stuff like this.  
See this article: [https://www.binarylane.com.au/support/solutions/articles/1000055889-how-to-benchmark-disk-i-o](https://www.binarylane.com.au/support/solutions/articles/1000055889-how-to-benchmark-disk-i-o)

The base SSD disk is around 9 times faster than the add-on volume.

Base disk:

```
Jobs: 1 (f=1): [m] [-.-% done] [115.8M/39880K /s] [29.7K/9970 iops] [eta 00m:00s]
   READ: io=307668KB, aggrb=127346KB/s, minb=127346KB/s, maxb=127346KB/s, mint=2416msec, maxt=2416msec
  WRITE: io=101932KB, aggrb=42190KB/s, minb=42190KB/s, maxb=42190KB/s, mint=2416msec, maxt=2416msec

```

Add-on volume:

```
Jobs: 1 (f=1): [m] [100.0% done] [11484K/3904K /s] [2871 /976 iops] [eta 00m:00s]
READ: io=306676KB, aggrb=14174KB/s, minb=14174KB/s, maxb=14174KB/s, mint=21635msec, maxt=21635msec
WRITE: io=102924KB, aggrb=4757KB/s, minb=4757KB/s, maxb=4757KB/s, mint=21635msec, maxt=21635msec

```

On the other hand, don’t overestimate the impact of a not so fast disk: if you use the add on disk only for files (`public/uploads` ) then nginx caching and kernel filesystem caching will save your day and you’ll still have a pretty decent performance.

---

<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: [August 25, 2017, 8:02pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/12 "2017-08-25T20:02:39Z")

</div>

> [@michaeld](#):
>
> if you use the add on disk only for files (public/uploads )

That would _definitely_ be my recommendation.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 25, 2017, 8:08pm UTC](https://meta.discourse.org/t/making-use-of-added-storage-volumes/51060/13 "2017-08-25T20:08:59Z")

</div>

> [@codinghorror](#):
>
> That would definitely be my recommendation.

I would also recommend keeping docker images and containers on the volume, it seems to be holding up fine. (also, clearly backups)

Its pretty simple you symlink `/var/lib/docker` to `/mnt/volume/whatever`
