Skip to content

Instantly share code, notes, and snippets.

@whytewolf
Created January 8, 2016 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whytewolf/242b1714d1cc62775a39 to your computer and use it in GitHub Desktop.
Save whytewolf/242b1714d1cc62775a39 to your computer and use it in GitHub Desktop.
salt-call partition.mklabel /dev/xvdf gpt
salt-call partition.mkpart /dev/xvdf primary start=1MB end=100%
salt-call partition.set_id /dev/xvdf 1 8e
salt-call lvm.pvcreate /dev/xvdf1
salt-call lvm.vgcreate vg_secor /dev/xvdf1
salt-call lvm.lvcreate lv_secor vg_secor extents=100%FREE
salt-call xfs.mkfs /dev/vg_secor/lv_secor
salt-call file.mkdir /srv/secor
salt-call mount.mount /srv/secor /dev/vg_secor/lv_secor
make-label:
module.run:
- name: partition.mklabel
- kwargs: {
device: /dev/xvdf
label_type: gpt
}
- unless: <insert a good unless here or say good bye to data>
make-part:
module.wait:
- name: parition.mkpart
- kwargs: {
device: /dev/xvdf
part_type: primary
start: 1MB
end: 100%
}
- watch:
- module: make-label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment