Os passos são:
-- create partitions on disk drives (type 8e in fdsik)
-- create physical volumes from the partitions --> $ sudo pvcreate /dev/sda1
-- create the volumes group --> $ sudo vgcreate -s 16m vg /dev/sda1
-- allocate logical volumes from the volume group --> $ sudo lvcreate -l 50g -n mylvm vg
-- format the logical volumes --> $ sudo mkfs -t ext4 /dev/vg/mylvm
-- mount the logical volumes (also update /etc/fstab as needed) --> $ mkdir /mylvm,
then --> $ sudo mount /dev/vg/mylvm /mylvm,
then add --> /dev/vg/mylvm /mylvm ext4 defaults 0 0 ( to the /etc/fstab)
Estrutura geral:
|-----------------------------------------------------------------------------------------------------------|
| LVM |
| ------------------------------------------------------------------------------| |
| FILE SYSTEMS | /HOME(EXT3) || /DATA(XFS) | |
| |-----------------------------------------------------------------------------| |
| LOGICAL VOLUMES(LV) | /DEV/PRIMARY_VG/HOME_|V || /DEV/PRIMARY_VG/DATA_|V | |
| |-----------------------------------------------------------------------------| |
| VOLUME GROUPS(VG) | PRIMARY_VG | |
| |-----------------------------------------------------------------------------| |
| PHYSICAL VOLUMES | /DEV/Sdb1 || /DEV/Sdb2 || /DEV/Sdc1 || /DEV/Sdc2 | |
| |-----------------------------------------------------------------------------| |
|-----------------------------------------------------------------------------------------------------------|
PARTITIONS |---------------||-------------| |----------------||-------------------|
| /DEV/Sdb1 || /DEV/Sdb2 | | /DEV/Sdc1 || /DEV/Sdc2 |
|---------------||-------------| |----------------||-------------------|
|------------------------------| |-------------------------------------|
PHYSICAL DRIVES | /Dev/Sdb | | /Dev/Sdc |
|------------------------------| |-------------------------------------|