# Sharing shared volumes

**URL:** https://meta.discourse.org/t/sharing-shared-volumes/71570
**Category:** Support
**Created:** [October 7, 2017, 6:52am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570 "2017-10-07T06:52:55Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Rob\_Spencer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rob_spencer/32/79869_2.png) [@Rob\_Spencer](https://meta.discourse.org/u/Rob_Spencer)
#### Post date: [October 7, 2017, 6:52am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/1 "2017-10-07T06:52:55Z")

</div>

Hey guys,

On the topic of High Availability…

I have two containers:  
web1  
data

I want to create a third: web2.

Can I point to the same shared volumes for both web containers?

```
volumes:
  - volume:
      host: /var/discourse/shared/web
      guest: /shared
  - volume:
      host: /var/discourse/shared/web/log/var-log
      guest: /var/log

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 9, 2017, 7:34pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/2 "2017-10-09T19:34:31Z")

</div>

This is a good question. It seems like one way to solve this problem is to use Amazon S3. A related question is, if you have multiple web containers across multiple servers, then what do you do?

---

<div class="post-metadata">

### Author: ![Rob\_Spencer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rob_spencer/32/79869_2.png) [@Rob\_Spencer](https://meta.discourse.org/u/Rob_Spencer)
#### Post date: [October 10, 2017, 10:14am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/3 "2017-10-10T10:14:42Z")

</div>

I thought it was a good question too, but yet to get a response from the developers ☹

---

<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: [October 11, 2017, 12:03am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/4 "2017-10-11T00:03:52Z")

</div>

You can point shared web to be the same but logs need to be separate.

Though I have no idea why you would run 2 web containers on same host, this is NINJA level setup. If you are in NINJA mode I am surprised you even have these questions 🤗

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 11, 2017, 12:37am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/5 "2017-10-11T00:37:28Z")

</div>

I’ve got no idea about 2 web containers on one machine either, but having two web servers on different machines I can imagine.

---

<div class="post-metadata">

### Author: ![Rob\_Spencer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rob_spencer/32/79869_2.png) [@Rob\_Spencer](https://meta.discourse.org/u/Rob_Spencer)
#### Post date: [October 11, 2017, 7:09am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/6 "2017-10-11T07:09:56Z")

</div>

NInja master say “never assume you know everything, always ask person who wrote the damn thing” 😉

> [@sam](#):
>
> You can point shared web to be the same but logs need to be separate.

Thanks, I’ll try this out.

The two web containers gets around the downtime while rebuilding a container. There’s no value in running them on two separate servers, which it’s already running on a high availability cloud platform. There’s a weird temptation to build HA on top of HA, but it’s just a waste of resources and ends up with server sprawl 🙂

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 11, 2017, 1:25pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/7 "2017-10-11T13:25:26Z")

</div>

If you have a separate data and web containers you can bootstrap the web container without stopping the one that’s running. When it’s done you then destroy the old one and start the new one. Down time is only a few seconds.

---

<div class="post-metadata">

### Author: ![Rob\_Spencer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rob_spencer/32/79869_2.png) [@Rob\_Spencer](https://meta.discourse.org/u/Rob_Spencer)
#### Post date: [October 11, 2017, 1:32pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/8 "2017-10-11T13:32:19Z")

</div>

Is there a way to back out to the old one in case there are any issues with the new one?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 11, 2017, 1:39pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/9 "2017-10-11T13:39:09Z")

</div>

Yes. Just leave it running.

---

<div class="post-metadata">

### Author: ![Rob\_Spencer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rob_spencer/32/79869_2.png) [@Rob\_Spencer](https://meta.discourse.org/u/Rob_Spencer)
#### Post date: [October 11, 2017, 1:41pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/10 "2017-10-11T13:41:08Z")

</div>

I’m confused…

> [@pfaffman](#):
>
> When it’s done you then destroy the old one and start the new one.

How do you start the same one? I would be easier to create a new one with a different name, an have the old one in standby in case you need to roll back.

---

<div class="post-metadata">

### Author: ![qianqiang](https://avatars.discourse-cdn.com/v4/letter/q/ecc23a/32.png) [@qianqiang](https://meta.discourse.org/u/qianqiang)
#### Post date: [May 22, 2018, 2:02am UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/11 "2018-05-22T02:02:41Z")

</div>

> [@Rob\_Spencer](#):
>
> separate

Even with two different machines, we can also consider ways to mount remote disks.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 9, 2020, 9:43pm UTC](https://meta.discourse.org/t/sharing-shared-volumes/71570/12 "2020-11-09T21:43:29Z")

</div>


