![Reducir el tamaño de un LVM en las advertencias generadas por LUKS](https://rvso.com/image/1703327/Reducir%20el%20tama%C3%B1o%20de%20un%20LVM%20en%20las%20advertencias%20generadas%20por%20LUKS.png)
Hola, he estado siguiendo esta guía útil (https://wiki.archlinux.org/title/Resizing_LVM-on-LUKS) sobre cómo reducir el tamaño de mi sistema de archivos y particiones para generar aproximadamente 100 G de espacio libre en la tabla de particiones para instalar Windows y firmar mi instalación de Ubuntu.
He notado que aparecen varias advertencias al usar comandos LVM después de hacerlo pvresize
y también me alarma que algunos comandos se informan en PiB en lugar de GiB, lo que me hace pensar que es posible que haya calculado mal algo. Dejé lo que estaba haciendo para reducir el riesgo de tener que limpiar la máquina y empezar de nuevo. Los datos esenciales están respaldados, pero aun así preferiría no realizar una reconstrucción.
Los mensajes de error son
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
A continuación se muestra el resultado de los diversos comandos de diagnóstico que conozco para verificar si
> sudo fdisk -l
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WD_BLACK SN770 500GB
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: 71C114FE-3DBF-4E71-A422-6CE906592E52
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 4550655 3500032 1.7G Linux filesystem
/dev/nvme0n1p3 4550656 976771071 972220416 463.6G Linux filesystem
> sudo lvdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Logical volume ---
LV Path /dev/vgubuntu/root
LV Name root
VG Name vgubuntu
LV UUID hPTH7U-FRG1-VPcT-OgAk-S2lY-pD5O-hR8ixl
LV Write Access read/write
LV Creation host, time ubuntu, 2023-07-23 19:58:39 +0000
LV Status NOT available
LV Size 361.66 GiB
Current LE 92586
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/vgubuntu/swap_1
LV Name swap_1
VG Name vgubuntu
LV UUID B5vW6H-cMcc-i0rt-CuEM-EC6a-tVQb-474jVv
LV Write Access read/write
LV Creation host, time ubuntu, 2023-07-23 19:58:39 +0000
LV Status NOT available
LV Size 1.91 GiB
Current LE 489
Segments 1
Allocation inherit
Read ahead sectors autosh
> sudo vgdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Volume group ---
VG Name vgubuntu
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 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 11.57 PiB
PE Size 4.00 MiB
Total PE 3106930687
Alloc PE / Size 93075 / 363.57 GiB
Free PE / Size 3106837612 / 11.57 PiB
VG UUID oIyZSZ-Ibd3-8Tjm-RpSf-wVts-ru19-88uWCR
> sudo pvdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Physical volume ---
PV Name /dev/mapper/cryptdisk
VG Name vgubuntu
PV Size 363.57 PiB / not usable 352.00 PiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3106930687
Free PE 3106837612
Allocated PE 93075
PV UUID XVxLuX-GtmB-CvcP-whyf-C1gN-n6yx-CXLzSA
> sudo pvs -v --segments /dev/mapper/cryptdisk
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
PV VG Fmt Attr PSize PFree Start SSize LV Start Type PE Ranges
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 0 92586 root 0 linear /dev/mapper/cryptdisk:0-92585
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 92586 25600 0 free
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 118186 489 swap_1 0 linear /dev/mapper/cryptdisk:118186-118674
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 118675 3106812012
Mi desafío con algunos de estos comandos es que no estoy seguro de en qué unidades se dan algunas estadísticas y qué parece un valor correcto y qué parece un valor incorrecto. Sin embargo, PV Size 363.57 PiB / not usable 352.00 PiB
me parece incorrecto cuando espero algo de alrededor de 360 GB.
Cualquier ayuda para leer los resultados de estos comandos y dejarme saber si tengo un problema real antes de continuar cambiando el tamaño de LUKS y luego la partición, sería muy apreciada.