Skip to content
This repository was archived by the owner on Feb 12, 2021. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion os/mounting-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ coreos:
Description=Mount ephemeral to /var/lib/docker
Requires=format-ephemeral.service
After=format-ephemeral.service
Before=docker.service
[Mount]
What=/dev/xvdb
Where=/var/lib/docker
Type=ext4
- name: docker.service
drop-ins:
- name: 10-wait-docker.conf
content: |
[Unit]
After=var-lib-docker.mount
Requires=var-lib-docker.mount
```

Notice that we're starting both units at the same time and using the power of systemd to work out the dependencies for us. In this case, `var-lib-docker.mount` requires `format-ephemeral.service`, ensuring that our storage will always be formatted before it is mounted. Docker will refuse to start otherwise.
Expand Down