Skip to content

Instantly share code, notes, and snippets.

@gravcat
Last active April 9, 2020 20:10
Show Gist options
  • Save gravcat/c0f8d3c711ccdff93a0f544d02e78005 to your computer and use it in GitHub Desktop.
Save gravcat/c0f8d3c711ccdff93a0f544d02e78005 to your computer and use it in GitHub Desktop.

creating a basic volume mounted for usage as type "Directory"

# clean device of any partitions or filesystem metadata
wipefs -a /dev/fioa

# create new ext4 filesystem across disk, no partition necessary
mkfs.ext4 /dev/fioa

# append mount instruction to /etc/fstab
tee -a "/dev/fioa /data/fio ext4 defaults 0 0" > /etc/fstab

creating an Logical Volume for usage as storage type "lvm-thin"

# clean device of any partitions or filesystem metadata
wipefs -a /dev/fioa

# create vg
vgcreate flash /dev/fioa1

# create partition 1 on empty device
sgdisk -N 1 /dev/sdb

# create physical volume
pvcreate --metadatasize 250k -y -ff /dev/fioa1

# create thin lvm, 1TB for now
lvcreate -L 1TB -T -n vmdata flash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment