Forrest logo
back to the lvcreate tool

lvcreate:tldr:6899d

lvcreate: Create a 1500 megabyte linear logical volume named mylv in the volume group vg1.
$ lvcreate -L ${1500} -n ${mylv} ${vg1}
try on your machine

This command is used to create a logical volume (LV) in Linux. Let's break down each component:

  • lvcreate: This is the command used to create a logical volume.

  • -L ${1500}: This option specifies the size of the logical volume to be created. In this case, the size is set to 1500 units. The units could be defined in various ways, such as megabytes (M), gigabytes (G), or terabytes (T).

  • -n ${mylv}: This option sets the name of the logical volume to be created. ${mylv} is a placeholder for the actual name. You can replace ${mylv} with the desired name for your logical volume.

  • ${vg1}: This parameter specifies the volume group (VG) where the logical volume will be created. It refers to the name of the volume group. You need to replace ${vg1} with the actual name of the volume group you want to use.

By running this command, you will create a logical volume with a size of 1500 units, named ${mylv}, within the volume group ${vg1}.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the lvcreate tool