informatica:linux:discos:lvm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:discos:lvm [2020/12/23 13:35] – javi | informatica:linux:discos:lvm [2023/10/05 00:27] (current) – jose | ||
|---|---|---|---|
| Line 605: | Line 605: | ||
| THIS MAY DESTROY YOUR DATA (filesystem etc.) | THIS MAY DESTROY YOUR DATA (filesystem etc.) | ||
| Do you really want to reduce vg/swap? [y/n] | Do you really want to reduce vg/swap? [y/n] | ||
| - | < | + | </code> |
| Pulsar ' | Pulsar ' | ||
| Line 650: | Line 650: | ||
| </ | </ | ||
| + | |||
| + | ====== Debian 12 ====== | ||
| + | Tenemos que desmontar /home | ||
| + | |||
| + | Miramos las particiones: | ||
| + | < | ||
| + | root@debian: | ||
| + | Filesystem | ||
| + | udev | ||
| + | tmpfs 783M 688K 783M 1% /run | ||
| + | / | ||
| + | tmpfs 3.9G | ||
| + | tmpfs 5.0M | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | tmpfs 783M | ||
| + | tmpfs 783M | ||
| + | </ | ||
| + | |||
| + | Miramos LVM | ||
| + | < | ||
| + | root@debian: | ||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name root | ||
| + | VG Name debian-vg | ||
| + | LV UUID sM1VB5-QkRX-BXM1-No2F-S23M-YwQU-Cg5351 | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 18:21:09 -0400 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size 22.25 GiB | ||
| + | Current LE 5697 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name var | ||
| + | VG Name debian-vg | ||
| + | LV UUID u5Hxq6-k9eJ-25WS-AK02-afVC-o76u-vlYnyd | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 18:21:09 -0400 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size <7.73 GiB | ||
| + | Current LE 1978 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name swap_1 | ||
| + | VG Name debian-vg | ||
| + | LV UUID r88cII-vYx4-aAmF-85yJ-vjq6-8jkR-vS5JtK | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 18:21:09 -0400 | ||
| + | LV Status | ||
| + | # open 2 | ||
| + | LV Size 976.00 MiB | ||
| + | Current LE 244 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name tmp | ||
| + | VG Name debian-vg | ||
| + | LV UUID mZHGHj-VUxN-QQhR-q8Lb-DAvW-E9sn-8ZuZ15 | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 18:21:09 -0400 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size 1.37 GiB | ||
| + | Current LE 351 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | |||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name home | ||
| + | VG Name debian-vg | ||
| + | LV UUID 69Y7rL-hzIr-21jn-KV3R-8qP5-XLdg-arYSL7 | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 18:21:10 -0400 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size <86.43 GiB | ||
| + | Current LE 22126 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | </ | ||
| + | Quitamos 40Gbs a /home: | ||
| + | lvreduce -L -40G / | ||
| + | < | ||
| + | WARNING: Reducing active and open logical volume to <46.43 GiB. | ||
| + | THIS MAY DESTROY YOUR DATA (filesystem etc.) | ||
| + | Do you really want to reduce debian-vg/ | ||
| + | Size of logical volume debian-vg/ | ||
| + | Logical volume debian-vg/ | ||
| + | </ | ||
| + | Vemos que hay 40Gb libres: | ||
| + | < | ||
| + | root@debian: | ||
| + | --- Volume group --- | ||
| + | VG Name | ||
| + | System ID | ||
| + | Format | ||
| + | Metadata Areas 1 | ||
| + | Metadata Sequence No 7 | ||
| + | VG Access | ||
| + | VG Status | ||
| + | MAX LV 0 | ||
| + | Cur LV 5 | ||
| + | Open LV 5 | ||
| + | Max PV 0 | ||
| + | Cur PV 1 | ||
| + | Act PV 1 | ||
| + | VG Size | ||
| + | PE Size 4.00 MiB | ||
| + | Total PE 30403 | ||
| + | Alloc PE / Size 20156 / 78.73 GiB | ||
| + | Free PE / Size 10247 / <40.03 GiB | ||
| + | VG UUID | ||
| + | </ | ||
| + | |||
| + | Se las añadimos a /var | ||
| + | lvextend -L +40G / | ||
| + | < | ||
| + | Size of logical volume debian-vg/ | ||
| + | Logical volume debian-vg/ | ||
| + | </ | ||
| + | Vemos que todavía no lo ha añadido: | ||
| + | < | ||
| + | df -h | ||
| + | Filesystem | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | Pero con lvdisplay si aparece: | ||
| + | < | ||
| + | --- Logical volume --- | ||
| + | LV Path / | ||
| + | LV Name var | ||
| + | VG Name debian-vg | ||
| + | LV UUID jud91P-5LXr-t0KI-5KSM-nim3-Xhvk-oSwkw5 | ||
| + | LV Write Access | ||
| + | LV Creation host, time debian, 2023-10-04 19:47:42 -0400 | ||
| + | LV Status | ||
| + | # open 1 | ||
| + | LV Size <47.73 GiB | ||
| + | Current LE 12218 | ||
| + | Segments | ||
| + | Allocation | ||
| + | Read ahead sectors | ||
| + | - currently set to 256 | ||
| + | Block device | ||
| + | </ | ||
| + | Hay que extender el FS: | ||
| + | resize2fs / | ||
| + | |||
| + | resize2fs 1.47.0 (5-Feb-2023) | ||
| + | Filesystem at / | ||
| + | old_desc_blocks = 1, new_desc_blocks = 6 | ||
| + | The filesystem on / | ||
| + | Ahora si que aparece: | ||
| + | < | ||
| + | root@debian: | ||
| + | Filesystem | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
informatica/linux/discos/lvm.1608730539.txt.gz · Last modified: by javi
