User Tools

Site Tools


redimensionar_swap_en_lvm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
redimensionar_swap_en_lvm [2023/03/11 04:04] osoredimensionar_swap_en_lvm [2024/10/17 21:42] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Redimensionar swap (y root) en LVM ======
 +
 +
 +
 Obtener el nombre de los grupos de lvm con ''lvs'' Obtener el nombre de los grupos de lvm con ''lvs''
 <code> <code>
Line 19: Line 23:
  
 Si no hay espacio suficiente, hay que achicar el otro VG Si no hay espacio suficiente, hay que achicar el otro VG
-<WRAP center round important 85%>+ 
 +<WRAP center round important 65%>
 ===== THIS MAY DESTROY YOUR DATA ===== ===== THIS MAY DESTROY YOUR DATA =====
 </WRAP> </WRAP>
Line 25: Line 30:
 Probablemente esto simplemente cambie el valor del último cluster/sector/byte/loquesea y si había datos después de esa posición no le importa. Probablemente esto simplemente cambie el valor del último cluster/sector/byte/loquesea y si había datos después de esa posición no le importa.
 <code>   <code>  
-facundo@AMD-Ryzen:~$ sudo lvresize -L-15G /dev/vgubuntu/root+facundo@AMD-Ryzen:~$ sudo lvresize -L-15G /dev/vgubuntu/root --resizefs
   WARNING: Reducing active and open logical volume to 877,80 GiB.   WARNING: Reducing active and open logical volume to 877,80 GiB.
   THIS MAY DESTROY YOUR DATA (filesystem etc.)   THIS MAY DESTROY YOUR DATA (filesystem etc.)
Line 33: Line 38:
   Logical volume vgubuntu/root successfully resized.   Logical volume vgubuntu/root successfully resized.
 </code> </code>
 +
 +<WRAP center round info 60%>
 +la opción ''resizefs'' hace que además del volumen, también se redimensione la partición. Va a pedir desmontar la partición para hacer el resizefs. Por esto no va a tener éxito si uno está 'parado encima' con el SO y hay que hacerlo con una version live booteable.
 +</WRAP>
 +
  
 Ahora sí, agrego más espacio al swap, tenía 1 GB y quiero llevarlo a 8 Ahora sí, agrego más espacio al swap, tenía 1 GB y quiero llevarlo a 8
 <code>   <code>  
-facundo@AMD-Ryzen:~$ sudo lvresize -L+7G /dev/vgubuntu/swap_1+facundo@AMD-Ryzen:~$ sudo lvresize -L+7G /dev/vgubuntu/swap_1 --resizefs
   Size of logical volume vgubuntu/swap_1 changed from 980,00 MiB (245 extents) to <7,96 GiB (2037 extents).   Size of logical volume vgubuntu/swap_1 changed from 980,00 MiB (245 extents) to <7,96 GiB (2037 extents).
   Logical volume vgubuntu/swap_1 successfully resized.   Logical volume vgubuntu/swap_1 successfully resized.
redimensionar_swap_en_lvm.1678507479.txt.gz · Last modified: 2024/10/17 21:42 (external edit)