{"id":27221183,"url":"https://github.com/khalidit23/resize-lvm-partition","last_synced_at":"2025-04-10T07:20:32.679Z","repository":{"id":286749267,"uuid":"962425331","full_name":"khalidit23/resize-lvm-partition","owner":"khalidit23","description":"Learn how to fix low disk space issues by extending logical volumes and resizing ext4 filesystems using LVM.","archived":false,"fork":false,"pushed_at":"2025-04-08T07:21:41.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T07:30:17.238Z","etag":null,"topics":["linux","linux-administration","linux-troubleshooting","lvextend","lvm","resize-lvm","ubuntu"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/khalidit23.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-04-08T06:24:13.000Z","updated_at":"2025-04-08T07:25:57.000Z","dependencies_parsed_at":"2025-04-08T07:30:32.016Z","dependency_job_id":"9aa62887-ec9f-4436-8680-3052bad782bd","html_url":"https://github.com/khalidit23/resize-lvm-partition","commit_stats":null,"previous_names":["khalidit23/resize-lvm-partition"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidit23%2Fresize-lvm-partition","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidit23%2Fresize-lvm-partition/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidit23%2Fresize-lvm-partition/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/khalidit23%2Fresize-lvm-partition/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/khalidit23","download_url":"https://codeload.github.com/khalidit23/resize-lvm-partition/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248173859,"owners_count":21059597,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux","linux-administration","linux-troubleshooting","lvextend","lvm","resize-lvm","ubuntu"],"created_at":"2025-04-10T07:20:32.075Z","updated_at":"2025-04-10T07:20:32.646Z","avatar_url":"https://github.com/khalidit23.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🛠️ Fix LVM Disk Space Issue on Ubuntu\n  \n![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=for-the-badge\u0026logo=ubuntu\u0026logoColor=white) \n\nWhen 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.\n\nThis guide shows how to extend the logical volume and filesystem to use all available space.\n\n---  \n## 🧠 Problem Summary\n\n- `lsblk` shows full disk size:\n\n![img alt](https://github.com/khalidit23/resize-lvm-partition/blob/06d76213fe45d2f51b5f5286b3d6e810ffd90cac/lsblk.png)\n\n- But `df -h` shows:\n\n![img alt](https://github.com/khalidit23/resize-lvm-partition/blob/06d76213fe45d2f51b5f5286b3d6e810ffd90cac/df-h.png)\n\n---\n \n\n## ✅ Solution: Extend LVM Logical Volume and Filesystem\n\n### ️Step 1: Confirm the correct LV name using:\n\nRun:\n```bash\nlvdisplay\n```\n### Step 2: Let's extend it to use all the free space using volume group and LV names:\n```bash\nlvextend -l +100%FREE /dev/datastore/LOG\n```\n### Step 3: After resizing the logical volume, resize the filesystem:\n\n```bash\nresize2fs /dev/mapper/datastore-LOG\n```\nNow run `df -h` again to check if the disk space has been extended..\n\n## ❤️ Support\nIf this guide helped you, feel free to star ⭐ this repository and share it with others!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidit23%2Fresize-lvm-partition","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhalidit23%2Fresize-lvm-partition","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhalidit23%2Fresize-lvm-partition/lists"}