Home Linux & Systems Cybersecurity Cloud & DevOps Networks & Infrastructure SIEM & Monitoring DFIR & Threat Intel Development & Other All categories Projects About Tools

Create volume in LVM with multiple disks.

Leer en espanol
Create volume in LVM with multiple disks.

Table of contents

The first thing we must do is create a physical volume (PV) with all the disks we want to add. To do this we use the pvcreate command textpvcreate /dev ===

Create physical volumes (PV – pvcreate)

The first thing we must do is create a physical volume (PV) with all the disks we want to add. To do this we use the pvcreate command

text
pvcreate /dev/sdd /dev/sde

Create the volume group (VG – vgcreate)

Now that we have created the physical volume, we have to create a volume group (VG) indicating all the disks that we want to add.

text
vgcreate vg_datos /dev/sdd /dev/sde

Create logical volume (LV – lvcreate)

Finally we just need to create the logical volume and add it to the file system.

text
lvcreate -l+100%FREE -n lv_datos vg_datos

We format and assemble

text
mkfs.ext4 /dev/vg_datos/lv_datos
mount /dev/vg_datos/lv_datos /datos

All the best.

:wq!

Comments