Created
January 16, 2017 18:42
-
-
Save JohnPreston/aa6f08e67c0ca989a978cc01e885ad82 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env bash | |
vdisplay | grep Path | grep LV | awk '{print $NF}' | xargs -i -P 1 lvremove -f {} | |
vgdisplay | grep Name | awk '{print $NF}' | xargs -i -P 1 vgremove -f {} | |
pvdisplay | grep Name | grep PV | awk '{print $NF}' | xargs -i -P 1 pvremove -f {} | |
fdisk -l | grep xvd | grep -v xvd[a-i] | grep -v Disk | awk '{print $1}' | sed 's/[0-9]//g' | xargs -i -P1 parted -s {} rm 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment