LVM
View information about pv
pvs
Initialize physical volume
pvcreate /dev/sda
Move extents from one physical volume to another report progress and only the extents belonging to the named LV
pvmove -i 10 -n /dev/pv_name /dev/sda /dev/sdb
Resize physical volume
pvresize /dev/sda
View information about vg
vgs
Add physical volumes to a volume group
vgextend fg_name /dev/sda
Display volume group information
vgdisplay vg_name -v
Remove physical volume
vgreduce fg_name /dev/sda
Create a volume group
vgcreate vg_name /dev/sda
Create a logical volume
lvcreate -l 100%FREE -n lv_name vg_name
View information about lv
lvs
lvs -a -o+devices
Add space to a logical volume
lvextend -l +50%FREE /dev/vg_name/lv_name
lvextend -l +100%FREE /dev/vg_name/lv_name
Connect to disk
fdisk /dev/sdX
Create the partition
: n
Type primary
: p
Type of partition
:t : 8e
Write changes
: w
Update info about size
partprobe
Create the volume
pvcreate /dev/sdXX
Add to volume group
vgdisplay
vgextend volume_group /dev/sdXX
Expend the space
lvdisplay
lvextend -l +100%FREE /dev/volume_group/logical_volume
Resize the volume group
resize2fs /dev/volume_group/logical_volume
Resize
(parted) resizepart
Resize physical volume
pvresize /dev/sdX
Expend the space
lvextend -l +100%FREE /dev/volume_group/logical_volume
Resize the volume group
resize2fs /dev/volume_group/logical_volume
Create similar partitions on a new disk
fdisk
parted
Copy the boot partition
dd if=/dev/sdX1 of=/dev/sdX1
Create the volume
pvcreate /dev/sdbx
Add to volume group
vgextend volume_group /dev/sdX
Move the partition
pvmove /dev/sdax /dev/sdbX
Remove from volume group
vgreduce volume_group-vg /dev/sdXX
Remove from lvm
premove /dev/sdXX
Install the grub2
grub-install --target=x86_64-efi /dev/sdX
Expend the space
lvdisplay
lvextend -l +100%FREE /dev/volume_group/logical_volume
Resize the volume group
resize2fs /dev/volume_group/logical_volume