https://github.com/khalidit23/resize-lvm-partition
Learn how to fix low disk space issues by extending logical volumes and resizing ext4 filesystems using LVM.
https://github.com/khalidit23/resize-lvm-partition
linux linux-administration linux-troubleshooting lvextend lvm resize-lvm ubuntu
Last synced: about 1 year ago
JSON representation
Learn how to fix low disk space issues by extending logical volumes and resizing ext4 filesystems using LVM.
- Host: GitHub
- URL: https://github.com/khalidit23/resize-lvm-partition
- Owner: khalidit23
- Created: 2025-04-08T06:24:13.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-08T07:21:41.000Z (about 1 year ago)
- Last Synced: 2025-04-08T07:30:17.238Z (about 1 year ago)
- Topics: linux, linux-administration, linux-troubleshooting, lvextend, lvm, resize-lvm, ubuntu
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🛠️ Fix LVM Disk Space Issue on Ubuntu

When you run `lsblk` and see a large disk (e.g., 3.2TB), but `df -h` shows only a few GB (e.g., 2.7GB), you might be using **LVM** and not utilizing the full disk space.
This guide shows how to extend the logical volume and filesystem to use all available space.
---
## 🧠 Problem Summary
- `lsblk` shows full disk size:

- But `df -h` shows:

---
## ✅ Solution: Extend LVM Logical Volume and Filesystem
### ️Step 1: Confirm the correct LV name using:
Run:
```bash
lvdisplay
```
### Step 2: Let's extend it to use all the free space using volume group and LV names:
```bash
lvextend -l +100%FREE /dev/datastore/LOG
```
### Step 3: After resizing the logical volume, resize the filesystem:
```bash
resize2fs /dev/mapper/datastore-LOG
```
Now run `df -h` again to check if the disk space has been extended..
## ❤️ Support
If this guide helped you, feel free to star ⭐ this repository and share it with others!