expandir_root_lvm
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| expandir_root_lvm [2024/03/25 17:27] – [Solución:] oso | expandir_root_lvm [2024/11/01 19:26] (current) – [Solución:] oso | ||
|---|---|---|---|
| Line 18: | Line 18: | ||
| ===== Solución: ===== | ===== Solución: ===== | ||
| + | |||
| + | ==== Ejemplos: ==== | ||
| + | |||
| + | |||
| + | === Expanding Root Filesystem in LVM on Ubuntu === | ||
| + | |||
| + | |||
| + | To use all available disk space in a VM with LVM, follow these steps: | ||
| + | |||
| + | 1. **Resize the partition**: | ||
| + | Start by resizing the partition to fill the remaining space on the disk. | ||
| + | |||
| + | <code bash> | ||
| + | sudo parted /dev/sda | ||
| + | </ | ||
| + | |||
| + | In the '' | ||
| + | |||
| + | <code bash> | ||
| + | (parted) resizepart 3 100% | ||
| + | (parted) quit | ||
| + | </ | ||
| + | |||
| + | 2. **Extend the Logical Volume**: | ||
| + | Use the '' | ||
| + | |||
| + | <code bash> | ||
| + | sudo lvextend -l +100%FREE / | ||
| + | </ | ||
| + | |||
| + | 3. **Resize the Filesystem**: | ||
| + | Finally, expand the filesystem to use the new space: | ||
| + | |||
| + | <code bash> | ||
| + | sudo resize2fs / | ||
| + | </ | ||
| + | |||
| + | 4. **Verify**: | ||
| + | Check the expanded disk space: | ||
| + | |||
| + | <code bash> | ||
| + | df -h | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| 1. **Redimensionamiento de la partición: | 1. **Redimensionamiento de la partición: | ||
expandir_root_lvm.1711387655.txt.gz · Last modified: 2024/10/17 21:42 (external edit)
