[PR #1838] [MERGED] New Script: Clean Orphaned LVM #3248

Closed
opened 2025-11-20 06:03:46 -05:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/1838
Author: @MickLesk
Created: 1/29/2025
Status: Merged
Merged: 1/29/2025
Merged by: @michelroegl-brunner

Base: mainHead: orphan_lxcs


📝 Commits (3)

  • 8831186 New Script: Clean Orphaned LVM
  • 5327c0a Rename clean_orphaned_lvm.json to clean-orphaned-lvm.json
  • 9464e35 Rename clean_orphaned_lvm.sh to clean-orphaned-lvm.sh

📊 Changes

2 files changed (+122 additions, -0 deletions)

View changed files

json/clean-orphaned-lvm.json (+39 -0)
misc/clean-orphaned-lvm.sh (+83 -0)

📄 Description

✍️ Description

This script helps Proxmox users identify and remove orphaned LVM volumes that are no longer associated with any VM or LXC container. It scans all LVM volumes, detects unused ones, and provides an interactive prompt to delete them safely. System-critical volumes like root, swap, and data are excluded to prevent accidental deletion.

Features:
Automatic orphaned LVM detection
Clear, formatted output
Interactive deletion confirmation
Prevents accidental removal of critical system volumes

Ideal for cleaning up unused storage in Proxmox environments running LVM.

image

Prerequisites

The following steps must be completed for the pull request to be considered:

  • Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.)
  • Testing performed (I have thoroughly tested my changes and verified expected functionality.)

🛠️ Type of Change

  • New script (a fully functional and thoroughly tested script or set of scripts)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/1838 **Author:** [@MickLesk](https://github.com/MickLesk) **Created:** 1/29/2025 **Status:** ✅ Merged **Merged:** 1/29/2025 **Merged by:** [@michelroegl-brunner](https://github.com/michelroegl-brunner) **Base:** `main` ← **Head:** `orphan_lxcs` --- ### 📝 Commits (3) - [`8831186`](https://github.com/community-scripts/ProxmoxVE/commit/88311864cdab91d17f491da83ff20e478619c3cc) New Script: Clean Orphaned LVM - [`5327c0a`](https://github.com/community-scripts/ProxmoxVE/commit/5327c0a12df14b2fd9e9c36792002e2fe854656a) Rename clean_orphaned_lvm.json to clean-orphaned-lvm.json - [`9464e35`](https://github.com/community-scripts/ProxmoxVE/commit/9464e352800051c3dd2c7fb523e7d0a5974f4221) Rename clean_orphaned_lvm.sh to clean-orphaned-lvm.sh ### 📊 Changes **2 files changed** (+122 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `json/clean-orphaned-lvm.json` (+39 -0) ➕ `misc/clean-orphaned-lvm.sh` (+83 -0) </details> ### 📄 Description ## ✍️ Description This script helps Proxmox users identify and remove orphaned LVM volumes that are no longer associated with any VM or LXC container. It scans all LVM volumes, detects unused ones, and provides an interactive prompt to delete them safely. System-critical volumes like root, swap, and data are excluded to prevent accidental deletion. Features: ✅ Automatic orphaned LVM detection ✅ Clear, formatted output ✅ Interactive deletion confirmation ✅ Prevents accidental removal of critical system volumes Ideal for cleaning up unused storage in Proxmox environments running LVM. ![image](https://github.com/user-attachments/assets/255af9ca-aee7-4269-95f2-043eb3c3ff84) ## ✅ Prerequisites The following steps must be completed for the pull request to be considered: - [x] Self-review performed (I have reviewed my code to ensure it follows established patterns and conventions.) - [x] Testing performed (I have thoroughly tested my changes and verified expected functionality.) ## 🛠️ Type of Change - [x] New script (a fully functional and thoroughly tested script or set of scripts) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2025-11-20 06:03:46 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#3248