Linux Administration/Devices and Filesystems/LVM/lvcreate

lvcreate[1] commands creates a logical volume (LV)


Examples:

  • lvcreate --size 5G -n my_new_logical_volume_name my_vol_group_name
--size or -L
  • Create LV using all VG space available:
lvcreate -l 100%FREE -n my_new_logical_volume_name my_vol_group_name[2]


Activities

edit
  • Create a new LV with lvcreate
  • Create a new stripped LV for performance:
lvcreate --size 50G -i 2 -I 64 -n new_stripped_lv_for_performance my_vg0
--type striped is not optional as -i option is used)
-i 2. Number of stripes.
  • Understand differences between LV types: --type linear|striped|snapshot|mirror|raid|thin|cache|thin-pool|cache-pool
  • Create a snapshot with:lvcreate --snapshot (See also qemu-img create for qcow2 snapshots)

See also

edit
  1. http://man7.org/linux/man-pages/man8/lvcreate.8.html
  2. https://stuff.mit.edu/afs/athena/project/rhel-doc/5/RHEL-5-manual/Cluster_Logical_Volume_Manager/LV_create.html