Forrest logo
back to the lvm tool

lvm:tldr:18348

lvm: Create a logical volume with size 10G from volume group vg1.
$ sudo lvm lvcreate -L ${10G} ${vg1}
try on your machine

This command is used to create a logical volume using LVM (Logical Volume Manager) in Linux. Here's the breakdown:

  • sudo: It stands for "superuser do" and is used to execute the following command with administrative privileges. It asks for the password of the superuser or a user with sudo privileges.

  • lvm: It's the command-line tool for managing Logical Volume Manager.

  • lvcreate: It is a sub-command of lvm used to create a new logical volume.

  • -L ${10G}: This option specifies the size of the logical volume to be created. ${10G} is a variable representing the size of 10 gigabytes. So, this command will create a logical volume with a size of 10 GB.

  • ${vg1}: This is another variable representing the name of the volume group in which the new logical volume will be created. The volume group is a pool of physical volumes (hard drives or partitions) from which logical volumes are created. You need to replace ${vg1} with the actual name of the volume group.

Overall, this command creates a new logical volume of 10GB within the specified volume group.

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 lvm tool