Skip to content

Instantly share code, notes, and snippets.

@ymxmore
Created August 21, 2015 00:47
Show Gist options
  • Select an option

  • Save ymxmore/2771672b518a8a924a69 to your computer and use it in GitHub Desktop.

Select an option

Save ymxmore/2771672b518a8a924a69 to your computer and use it in GitHub Desktop.
Disk attachment memo
# --------------------------------------------------------------------------------------------------------
# If you want to attach the storage can comment , Please specify the size of the storage
# --------------------------------------------------------------------------------------------------------
# - name: format-var-lib-docker.service
# command: start
# content: |
# [Unit]
# Before=docker.service var-lib-docker.mount
# ConditionPathExists=!/dev/sdb1
# [Service]
# Type=oneshot
# ExecStart=/usr/sbin/parted -s -a optimal /dev/sdb mklabel gpt -- mkpart primary ext4 0 -0
# ExecStart=/usr/sbin/mkfs.ext4 /dev/sdb1
# - name: var-lib-docker.mount
# enable: true
# content: |
# [Unit]
# Before=docker.service
# After=format-var-lib-docker.service
# Requires=format-var-lib-docker.service
# [Install]
# RequiredBy=docker.service
# [Mount]
# What=/dev/sdb1
# Where=/var/lib/docker
# Type=ext4
# --------------------------------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment