Actualice SSD de 1 TB a 2 TB: pv, vg, lv y fdisk OK. df dice que no hay cambios

Actualice SSD de 1 TB a 2 TB: pv, vg, lv y fdisk OK. df dice que no hay cambios

Estoy actualizando un SSD de servidor 20.04 de 1 TB a 2 TB. La transferencia salió bien, pero parece que estoy atascado en el último paso tratando de que aparezca el nuevo espacio. pvdisplay, vgdisplay, lvdisplayy fdisktodos muestran 2 TB de espacio. Cuando lo verifico df, todavía refleja el tamaño de la partición original. Resize2fs arroja el error "No se pudo encontrar un superbloque de sistema de archivos válido". ¿Qué me estoy perdiendo?

>> 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

Respuesta1

La solución: me estaba concentrando en la partición física que LVM acordó que ya había cambiado de tamaño. Lo que tenía que hacer era cambiar el tamaño (editar)sistema de archivos dentro delLV mapeado.

En lugar de esto: resize2fs /dev/sda3

Debería haber sido: resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

información relacionada