Atualize SSD de 1 TB para 2 TB: pv, vg, lv e fdisk OK. df diz que não há mudança

Atualize SSD de 1 TB para 2 TB: pv, vg, lv e fdisk OK. df diz que não há mudança

Estou atualizando um SSD de servidor 20.04 de 1 TB para 2 TB. A transferência correu bem, mas parece que estou preso na última etapa, tentando fazer com que o novo espaço apareça. pvdisplay, vgdisplay, lvdisplaye fdisktodos mostram 2 TB de espaço. Quando eu verifico df, ele ainda reflete o tamanho original da partição. Resize2fs gera o erro "Não foi possível encontrar o superbloco válido do sistema de arquivos". o que estou perdendo?

>> user@host ~ % sudo pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               ubuntu-vg
  PV Size               <1.82 TiB / not usable <3.07 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              476547
  Free PE               0
  Allocated PE          476547
  PV UUID               Dq...Op

>> user@host ~ % sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  7
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <1.82 TiB
  PE Size               4.00 MiB
  Total PE              476547
  Alloc PE / Size       476547 / <1.82 TiB
  Free  PE / Size       0 / 0
  VG UUID               jl...pz

>> user@host ~ % sudo lvdisplay
  --- Logical volume ---
  LV Path                /dev/ubuntu-vg/ubuntu-lv
  LV Name                ubuntu-lv
  VG Name                ubuntu-vg
  LV UUID                Hw...Qx
  LV Write Access        read/write
  LV Creation host, time ubuntu-server, 2021-03-20 20:20:34 -0700
  LV Status              available
  # open                 1
  LV Size                <1.82 TiB
  Current LE             476547
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

>> user@host ~ % sudo fdisk -l
Disk /dev/sda: 1.82 TiB, 2000398934016 bytes, 3907029168 sectors
Disk model: SanDisk SDSSDH3
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: gpt
Disk identifier: 29...AB

Device       Start        End    Sectors  Size Type
/dev/sda1     2048    1050623    1048576  512M EFI System
/dev/sda2  1050624    3147775    2097152    1G Linux filesystem
/dev/sda3  3147776 3907029134 3903881359  1.8T Linux filesystem

Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 1.82 TiB, 1998782988288 bytes, 3903873024 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

>> sudo resize2fs /dev/sda3
resize2fs 1.45.6 (20-Mar-2020)
resize2fs: Device or resource busy while trying to open /dev/sda3
Couldn't find valid filesystem superblock.

>> user@host ~ % df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                               26G  3.6M   26G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  937G  462G  435G  52% /
tmpfs                              126G     0  126G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda2                          976M  317M  593M  35% /boot
/dev/sda1                          511M  7.9M  504M   2% /boot/efi
tmpfs                               26G     0   26G   0% /run/user/1000

Responder1

A correção: eu estava focando na partição física que o LVM concordou que já havia sido redimensionada. O que eu precisava fazer era redimensionar o (editar)sistema de arquivos dentro doLV mapeado.

Em vez disso: resize2fs /dev/sda3

Deveria ter sido: resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

informação relacionada