Last active
August 28, 2018 20:19
-
-
Save vermashi/1b2381b3cc87af9d402e4a3d33ab419d to your computer and use it in GitHub Desktop.
Format the data disks with LVM in an azure linux VM
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 | |
set -x | |
pvcreate -f /dev/disk/azure/scsi1/lun1 | |
vgcreate vg0 /dev/disk/azure/scsi1/lun1 | |
lvcreate -l100%FREE -n lv0 vg0 | |
echo "y" | mkfs.ext4 /dev/mapper/vg0-lv0 | |
mkdir /data1 | |
echo "/dev/mapper/vg0-lv0 /data1 ext4 defaults,nofail 0 0" >>/etc/fstab | |
mount -a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment