Finalmente descobri isso -
sudo growpart /dev/sda 5 # extend the existing part
sudo pvresize /dev/sda5 # bring in the extra space
sudo lvresize -l+100%FREE --resizefs ORDRedis1-vg/root ## resize
Eu adicionei 30 GB de espaço a um dos meus servidores 16.04 redis que usam o LVM.
Consegui ver a unidade física, mas não consigo descobrir como expandir o disco lógico
:
root@Redis5:/dev# lvmdiskscan
/dev/Redis1-vg/root [ 45.52 GiB]
/dev/sda1 [ 487.00 MiB]
/dev/Redis1-vg/swap_1 [ 4.00 GiB]
/dev/sda5 [ 79.52 GiB] LVM physical volume
1 disk
2 partitions
0 LVM physical volume whole disks
1 LVM physical volume
Eu tentei:
root@Redis5:/dev# sudo lvresize -l+100%FREE --resizefs Redis1-vg/root
Size of logical volume Redis1-vg/root unchanged from 45.52 GiB (11653 extents).
Logical volume root successfully resized.
resize2fs 1.42.13 (17-May-2015)
The filesystem is already 11932672 (4k) blocks long. Nothing to do!
root@Redis5:/dev# vgdisplay
--- Volume group ---
VG Name Redis1-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 49.52 GiB
PE Size 4.00 MiB
Total PE 12677
Alloc PE / Size 12677 / 49.52 GiB
Free PE / Size 0 / 0
VG UUID IIvQQr-JfYI-wJYh-tLBI-FqnX-IW6R-q8uDCm
root@Redis5:/dev# fdisk -l
Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 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
Disklabel type: dos
Disk identifier: 0x96a5b056
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 999423 997376 487M 83 Linux
/dev/sda2 1001470 167772126 166770657 79.5G 5 Extended
/dev/sda5 1001472 167772126 166770655 79.5G 8e Linux LVM
Disk /dev/mapper/Redis1--vg-root: 45.5 GiB, 48876224512 bytes, 95461376 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 /dev/mapper/Redis1--vg-swap_1: 4 GiB, 4294967296 bytes, 8388608 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
Qualquer ajuda seria muito apreciada.
Finalmente descobri isso -
sudo growpart /dev/sda 5 # extend the existing part
sudo pvresize /dev/sda5 # bring in the extra space
sudo lvresize -l+100%FREE --resizefs ORDRedis1-vg/root ## resize
Como parece que você já redimensionou a partição subjacente, você deve executar pvresize
antes de redimensionar o LV.