Forked from mthenw/gist:fe8c0b24876c3df3a258635617e826b8
Created
April 2, 2020 17:30
-
-
Save jkmart/8c4e5a238e787dde7a8350668986c3b2 to your computer and use it in GitHub Desktop.
systemd mounting and formatting
This file contains 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