Created
September 22, 2017 08:11
-
-
Save mthenw/fe8c0b24876c3df3a258635617e826b8 to your computer and use it in GitHub Desktop.
systemd mounting and formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd: | |
units: | |
- name: format-ebs.service | |
command: start | |
contents: | | |
[Unit] | |
Description=Formats EBS /dev/xvdb volume | |
After=dev-xvdb.device | |
Requires=dev-xvdb.device | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/sbin/wipefs -f /dev/xvdb | |
ExecStart=/usr/sbin/mkfs.ext4 /dev/xvdb | |
- name: var-lib-etcd.mount | |
command: start | |
contents: | | |
[Unit] | |
Description=Mount EBS to /var/lib/etcd | |
Requires=format-ebs.service | |
After=format-ebs.service | |
[Mount] | |
What=/dev/xvdb | |
Where=/var/lib/etcd | |
Type=ext4 | |
[Install] | |
WantedBy=multi-user.target | |
- name: etcd-member.service | |
dropins: | |
- name: 10-wait-etcd-member.conf | |
contents: | | |
[Unit] | |
After=var-lib-etcd.mount | |
Requires=var-lib-etcd.mount |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment