Passo 01 Para expandir a partição utilizando LVM use o comando fdisk /dev/XXXY alterando XXXY para o label da partição utilizada pelo LVM.
fdisk /dev/sdb1
Commmand (m for help): d
Partition number (1,2, default 2):{enter}
Partition 2 is deleted
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p):{enter}
Using default response p
Parttion number (2-4, default 2): {enter}
First sector (1026048-27262975, default 1026048): {enter}
Using default value
Last sector, +sectors or +size {K,M,G} (1026048-27262975), default 27262975):{enter}
Using default value
Partition 2 of type Linux and of size 12.5G is set
Command(m for help): t
Partition number (1,2, default 2): {enter}
Hex code (type L to list all codes): 8e
Changed type of parttion 'Linux' to 'Linux LVM'
Command (m for help): p
**Disk /dev/sda: 14.0Gb, 13958643712 bytes, 27262976 sectors
Units=sectors of 1*512=512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000912b7
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 27262975 13118464 8e Linux LVM
Command (m for help): w
The partition table has been altered!
Comandos do passo 1 em sequência:
fdisk /dev/sdb1
d
{enter}__code_NL
code_NL__{enter}
{enter}
{enter}
{enter}
t
{enter}
8e
p
w
Passo 02 Reler as tabelas de partições do sistema e a nova partição ficará disponível.
partprobe
Passo 03 Verificar volumes físicos.
pvdisplay
Passo 04 Mudar tamanho do volume físico, alterar XXXY para o label da partição utilizada pelo LVM.
pvresize /dev/XXXY
Passo 05 Verificar volumes físicos.
pvdisplay
Passo 06 Verificar volumes lógicos.
lvdisplay
Passo 07 Estender o volume logico, alterar XXX pelo tamanho que será adicionar da partição em Gigabytes e /dev/YYY/ZZZ pelo caminho do volume logico.
lvextend -L+XXXGB /dev/YYY/ZZZ
Passo 08 Verificar volumes lógicos.
lvdisplay
Passo 09 Expandir a partição XFS, verificar o tamanho máximo e alterar por 999999999.
xfs_growfs /dev/dados/dados_lv -D 999999999
Passo 10 Verificar se partição foi expandida.
df -h