LinuxCommandLibrary
GitHub F-Droid Google Play Store

lvcreate

creates a logical volume in an existing volume group

TLDR

Create 10 GB volume
$ sudo lvcreate -L 10G vg1
copy
Create named volume
$ sudo lvcreate -L 1500M -n mylv vg1
copy
Use 60% of volume group
$ sudo lvcreate -l 60%VG -n mylv vg1
copy
Use all free space
$ sudo lvcreate -l 100%FREE -n mylv vg1
copy

SYNOPSIS

lvcreate [OPTIONS] VolumeGroup

DESCRIPTION

lvcreate creates a logical volume in an existing volume group. Logical volumes are virtual block devices that can span multiple physical volumes and support features like snapshots, striping, and mirroring.

PARAMETERS

-L, --size size

Specify size (e.g., 10G, 1500M)
-l, --extents extents
Specify size in extents or percentage (%VG, %FREE, %PVS)
-n, --name name
Name for the logical volume
-s, --snapshot
Create a snapshot volume
-T, --thin
Create a thin pool or thin volume
--thinpool pool
Specify thin pool for thin volume
-m, --mirrors count
Create a mirrored volume
-i, --stripes count
Number of stripes for striped volume

CAVEATS

The volume group must have sufficient free space. Logical volume names must be unique within a volume group. After creation, a filesystem must be created on the LV before mounting.

HISTORY

lvcreate is part of LVM2, the Linux Logical Volume Manager.

SEE ALSO

lvm(8), lvextend(8), lvremove(8), vgcreate(8)

Copied to clipboard
Kai

AltStyle によって変換されたページ (->オリジナル) /