micropost(lvm): recover corrupted filesystem

This commit is contained in:
Ming Di Leom 2026-02-23 07:42:03 +00:00
parent def7e9009c
commit e6582679c2
No known key found for this signature in database
GPG Key ID: 32D3E28E96A695E8
1 changed files with 13 additions and 5 deletions

View File

@ -1,6 +1,7 @@
---
title: Extending LVM partition after disk expansion
date: 2026-01-17
updated: 2026-02-23
---
1. Boot GParted Live as this is best done offline.
@ -8,7 +9,8 @@ date: 2026-01-17
3. Using GParted program, deactivate the LVM partition.
4. Resize the LVM partition by dragging the right-arrow to the end.
5. Click tick ✓ to apply. Resizing should take only a few seconds, if it's not finished within a minute, reboot GParted Live and repeat; this may happen if Steps 2-3 are skipped.
6. Launch Terminal,
6. Reactivate the LVM partition.
7. Launch Terminal,
```
sudo -s
@ -16,13 +18,19 @@ vgs
lvs
```
7. `vgs` may show non-zero VFree value meaning the volume group contains unallocated space. `lvs` lists the volume group and logical volume, the values are used in `lvresize`; Ubuntu defaults to `ubuntu-vg/ubuntu-lv`, the slash is not an _OR_, both values with a slash are required.
8. `vgs` may show non-zero VFree value meaning the volume group contains unallocated space. `lvs` lists the volume group and logical volume, the values are used in `lvresize`; Ubuntu defaults to `ubuntu-vg/ubuntu-lv`, the slash is not an _OR_, both values with a slash are required.
```
lvresize -l +100%FREE --resizefs VG-name/LV-name
vgs
```
8. `vgs` should now show zero VFree value.
9. In GParted program, activate the LVM partition.
10. Reboot.
9. `lvresize` may fail due to corrupted filesystem, skip this step if no error.
```
e2fsck -f /dev/VG-name/LV-name
resize2fs /dev/VG-name/LV-name
```
10. `vgs` should now show zero VFree value.
11. Reboot.