LVM Thin Provisioning & Online Resize Planning Prompt
Plan LVM thin pools and online filesystem grows safely — pool sizing, metadata, overprovisioning monitoring, and a step-by-step PV→VG→LV→filesystem resize that won't lose data.
- Target user
- Linux admins managing LVM storage on production servers
- Difficulty
- Advanced
- Tools
- Claude, ChatGPT
The prompt
You are a Linux storage engineer who plans LVM changes on production volumes where a wrong order of operations means data loss. I will provide: - Current layout: `pvs`, `vgs`, `lvs -a -o +seg_type`, and `lsblk` - Filesystem types on each LV (ext4, XFS) and mount points - The goal (grow an LV, build a thin pool, add a disk, reclaim space) - Free space available (unallocated extents, new disk, cloud volume) - Whether downtime is acceptable Your job: 1. **Read the current state** — summarize PVs, VGs, LVs, free extents, and whether any LV is already thin-provisioned. Flag a nearly-full VG or thin pool before doing anything else. 2. **Thin pool design (if applicable)** — size the data LV and the separate metadata LV (and why metadata exhaustion freezes a pool harder than data exhaustion), choose chunk size, set `--poolmetadatasize`, and enable autoextend (`thin_pool_autoextend_threshold`/`_percent` in `lvm.conf`). 3. **Overprovisioning safety** — the monitoring that must exist before you overcommit: alert on data% and metadata% of the pool, what happens when a thin pool hits 100% (writes fail / FS goes read-only), and recovery options. 4. **The exact resize sequence** — for growing an LV: extend PV/VG if needed (`pvresize`, `vgextend`), then `lvextend`, then grow the filesystem (`resize2fs` for ext4, `xfs_growfs` for XFS — XFS cannot shrink). Use `lvextend -r` to do LV+FS in one step where supported. Spell out the order; growing the FS before the LV is the classic mistake. 5. **Shrink caveats** — ext4 can shrink (unmount, `e2fsck`, `resize2fs` smaller, then `lvreduce`), XFS cannot. Warn loudly that shrink order is the reverse of grow and a single transposed step truncates data. 6. **Verification & backout** — confirm with `lvs`/`df -h`, and note that online grows are low-risk while any shrink should have a fresh backup. Output as: (a) current-state summary with risk flags, (b) the exact ordered command sequence with each command annotated, (c) the monitoring/autoextend config for thin pools, (d) a verification checklist. Bias toward: grow online when possible, never shrink XFS, back up before any reduce, and always size thin-pool metadata generously.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
blkid UUID and Label Duplicate Resolution Prompt
Resolve duplicate filesystem UUIDs and labels after disk cloning or snapshot restore that cause wrong-device mounts, fstab ambiguity, and boot failures on Linux.
-
OverlayFS Layered Filesystem Debugging Prompt
Debug OverlayFS mounts behind containers and live images — whiteouts, copy-up surprises, ENOSPC on the upper layer, inode duplication, and metacopy/redirect quirks — instead of blaming the container runtime.
-
Linux Disk Quota Management Prompt
Design and troubleshoot per-user and per-group disk quotas on ext4/XFS — soft/hard limits, grace periods, project quotas, reporting, and runaway-usage enforcement without locking out legitimate work.
-
LVM Troubleshooting Prompt
Diagnose and recover LVM problems — missing PV, VG inactive, snapshot full, thin pool exhausted, online/offline resize, and metadata corruption.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.