DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
Skip to content
VGSources
Blog

How to Use LVM to Manage Storage on a Linux VPS

Learn the complete LVM workflow on a Linux VPS, from adding a disk and creating a mounted logical volume to expanding capacity and taking monitored snapshots.
Length11 min Posted Quest giverVGSources Team

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

LVM lets you pool VPS disks into a volume group, carve out logical volumes, and grow storage without redesigning the whole partition layout. The reliable workflow is layered: confirm that your VPS exposes a usable block device or has been enlarged by the provider, initialize a physical volume (PV), create or extend a volume group (VG), create a logical volume (LV), put a filesystem on it, mount it by UUID, and then verify every layer. When capacity increases, expand the provider disk or attach another device first; only then resize the PV, VG, LV, and filesystem in that order.

This guide covers a new data volume, an existing LVM volume that needs more space, and snapshots for backup workflows. Commands use placeholder paths such as /dev/sdX; replace them only after confirming the actual device on your VPS.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What LVM does on a VPS

Logical Volume Management is a storage abstraction that is more flexible than fixed traditional partitions. It separates physical capacity from the virtual block devices that applications use.

Layer What it represents Typical commands
Physical volume (PV) A whole disk or partition initialized for LVM. It contributes extents to a pool. pvcreate, pvs, pvdisplay
Volume group (VG) A pool made from one or more PVs. Free space in the pool can be assigned to different LVs. vgcreate, vgextend, vgs, vgdisplay
Logical volume (LV) A virtual block device cut from a VG. It normally receives a filesystem and mount point. lvcreate, lvextend, lvs, lvdisplay
Filesystem and mount The format applications read and write, mounted at a directory such as /srv/data. mkfs, mount, findmnt, df

LVM cannot create provider-side capacity. Your VPS must expose a block device, an attached volume, or an already enlarged virtual disk. A larger number in the hosting control panel is not useful to the guest until the operating system can see the new sectors.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Before changing storage: prerequisites and safety checks

  • Provider capacity: Confirm that a second block device is attached or that the existing virtual disk has been enlarged. Record the provider’s device path if it supplies one.
  • Root access: The commands below use sudo and require an administrative account.
  • A current backup: Back up important data before creating, resizing, or changing mounts. A mistaken device path can destroy an existing filesystem.
  • A maintenance plan: Filesystem growth is commonly online, but a mount or partitioning mistake can still interrupt services. Know how to access the VPS console if SSH becomes unavailable.
  • Free space policy: Decide whether to reserve space in the VG for later LVs or allocate all free extents immediately. Do not use -l 100%FREE casually.

Map the disks the guest can actually see

Start with an inventory, not an assumption that a new disk is /dev/sdb.

lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS

Look for the disk or partition supplied by the VPS provider, its size, whether it already has a filesystem, and whether it is mounted. A device with an existing filesystem or mount point is not a safe target for pvcreate. If the provider has just enlarged a disk, compare the size shown by lsblk with the new capacity before proceeding.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For an existing LVM installation, inspect all three layers before making a change:

sudo pvs
sudo vgs
sudo lvs

Use the longer forms when you need details:

sudo pvdisplay
sudo vgdisplay
sudo lvdisplay

These checks reveal the PV device, VG free space, LV path, and current allocation. Capture the output in your change record so you can compare it after each operation.

Create a new LVM data volume

1. Initialize the correct disk or partition as a PV

Replace /dev/sdX with the confirmed, unused device. If your design uses a partition, use its full path, such as /dev/sdX1, consistently in later commands.

sudo pvcreate /dev/sdX

pvcreate writes LVM metadata to the selected target. Treat a wrong path as a destructive error; stop and re-run lsblk if the device identity is not certain.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the result:

sudo pvs
sudo pvdisplay /dev/sdX

2. Create a VG or add the PV to an existing one

For a new pool named vg_data:

sudo vgcreate vg_data /dev/sdX

If an existing VG should absorb the new capacity instead:

sudo vgextend existing_vg /dev/sdX

Check the pool and its unallocated extents:

sudo vgs
sudo vgdisplay vg_data

A VG can combine multiple PVs. That is useful for allocating a larger LV or several separate LVs, but it also means recovery and replacement planning must account for every PV in the group.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

3. Create the LV with an intentional size

This example reserves a 100-GiB logical volume named lv_data:

sudo lvcreate -L 100G -n lv_data vg_data

In LVM command input, units are binary: G means GiB and M means MiB. Confirm the result and the remaining VG free space:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo lvs
sudo vgs

To consume every currently free extent, the alternative is:

sudo lvcreate -l 100%FREE -n lv_data vg_data

Use that form only when you deliberately want no VG reserve for another LV, a snapshot, or future allocation.

lvcreate supports several LV types, including linear, striped, mirrored, snapshot, and thin-pool forms. A plain linear LV is the straightforward choice for a general data mount; specialized types require a design for their own space, performance, and recovery behavior.

4. Create a filesystem

Formatting is a separate operation from creating the LV. The following example uses ext4:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo mkfs.ext4 /dev/vg_data/lv_data

Do not run a filesystem-creation command on an LV that already contains data. If you choose another filesystem, use its own creation and growth tools and record that choice for future maintenance.

5. Mount the volume for the first time

Create a mount point and mount the LV:

sudo mkdir -p /srv/data
sudo mount /dev/vg_data/lv_data /srv/data

Confirm both the source and the filesystem:

findmnt /srv/data
lsblk -f
df -hT /srv/data

At this point, applications can use /srv/data, but the mount will not necessarily return after a reboot until it is recorded in /etc/fstab.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

6. Persist the mount with a UUID

Obtain the filesystem UUID:

sudo blkid /dev/vg_data/lv_data

Edit /etc/fstab and add a line using the returned UUID. For an ext4 filesystem mounted at /srv/data, the shape is:

UUID=your-filesystem-uuid /srv/data ext4 defaults 0 2

Use the exact UUID and filesystem type reported by blkid; do not copy the example token literally. Validate the file before rebooting:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo mount -a
findmnt /srv/data

If mount -a reports an error, fix the fstab line while the current session is still available. A bad entry can prevent a clean boot or leave the expected data path absent.

Expand storage after increasing a VPS disk

Expansion is a chain of dependent layers. The provider must expose more sectors first, then the guest may need a partition resize, followed by LVM and filesystem growth.

  1. Increase capacity outside the guest. Enlarge the VPS disk in the provider control panel or attach a second block device.
  2. Confirm the guest view. Run lsblk and compare the visible disk size with the provider’s change.
  3. Resize a partition if one ends before the new disk boundary. Use the distribution’s partitioning tool and verify the resulting partition path. Skip this step when the PV occupies a whole disk or when a separate new disk is being added.
  4. Resize or add a PV. For an enlarged existing PV, run sudo pvresize /dev/<partition>. For a separate device, run sudo pvcreate /dev/sdY and add it with sudo vgextend vg_data /dev/sdY.
  5. Confirm VG free space. Use sudo vgs before allocating it.
  6. Extend the LV. Add a fixed amount, for example sudo lvextend -L +20G /dev/vg_data/lv_data, or allocate all free extents with sudo lvextend -l +100%FREE /dev/vg_data/lv_data.
  7. Grow the filesystem. LV capacity and filesystem capacity are separate. Use the tool matching the filesystem.
  8. Verify every layer. Compare lvs with df -hT, and check the mount with findmnt.

Growing an ext4 filesystem

sudo resize2fs /dev/vg_data/lv_data

Then verify:

sudo lvs
df -hT /srv/data

Growing an XFS filesystem

XFS growth targets the mounted filesystem rather than the LV path:

sudo xfs_growfs /srv/data

Check the resulting mounted size with df -hT /srv/data.

Using lvextend -r

Some LVM versions support lvextend -r, which requests filesystem resizing together with LV growth. Because the filesystem step remains type-specific, verify the result with both lvs and df -hT rather than assuming a successful LV change enlarged the filesystem.

Add a second disk to an existing data pool

A separate block device follows the shorter branch of the expansion process:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
  1. Confirm the new device with lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS.
  2. Back up important data and ensure the device is not mounted or holding a needed filesystem.
  3. Initialize it: sudo pvcreate /dev/sdY.
  4. Add it to the pool: sudo vgextend vg_data /dev/sdY.
  5. Check free space with sudo vgs.
  6. Extend the intended LV with lvextend.
  7. Grow the filesystem with resize2fs for ext4 or xfs_growfs for XFS.
  8. Confirm the mount and usable capacity.

Adding a PV increases pool capacity; it does not automatically enlarge an existing LV or filesystem. Those are explicit operations so that you can choose which workload receives the new space.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use LVM snapshots safely

An LVM snapshot represents the source LV at a point in time while the original volume continues to be used. This can provide a consistent image for a backup workflow without shutting down the system.

A classic snapshot command is:

sudo lvcreate -s -L 10G -n lv_data_snap /dev/vg_data/lv_data

The -L 10G value is the snapshot’s allocated copy-on-write area, not a promise that the snapshot can hold an unlimited independent copy of the source. As blocks on the origin change, snapshot space is consumed. Monitor it:

sudo lvs

A full classic snapshot becomes unusable. Therefore:

  • Estimate how much the source may change during the backup window.
  • Keep enough free space in the VG for the snapshot allocation.
  • Copy the snapshot’s data to independent storage as part of the backup job.
  • Remove the snapshot after the copy has been verified, following your normal change procedure.
  • Monitor snapshot usage while long-running backups are active.

A snapshot is not an independent backup merely because it looks like a frozen image. Loss of the VPS, its provider storage, or the VG can affect both origin and snapshot. Keep a separate backup copy and test restoration.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose between LVM, a provider volume, and filesystem-native features

The right layer depends on where you want flexibility and where you want the provider or filesystem to handle operations.

Decision axis LVM on the VPS Separate provider block volume Filesystem-native volume features
Online expansion Layered: provider, partition when applicable, PV, VG, LV, then filesystem. Depends on the provider’s attach and resize workflow, followed by guest-side filesystem growth. Depends on the filesystem and its supported online operations.
Snapshots LVM snapshots can present a point-in-time LV image; snapshot space must be monitored. Provider snapshots may be simpler to initiate but follow provider-specific semantics. Native snapshots, if available, follow filesystem-specific tooling and limits.
Portability The VG and its PV metadata move with the disks, but reattachment and device discovery still require planning. Portability depends on whether the provider can detach and attach the volume across hosts. Portability follows the filesystem’s support on the destination system.
Performance and redundancy LV type and PV layout determine the allocation model; LVM alone is not a substitute for an independent redundancy plan. Performance and durability are provider characteristics. Behavior is determined by the filesystem and underlying storage.
Recovery work Operators must understand PV, VG, LV, mount, and filesystem layers. Provider attach, device discovery, and filesystem checks remain necessary. Recovery is concentrated in filesystem-native tooling but remains filesystem-specific.

LVM is especially useful when you want one pool to feed several independently mounted LVs or expect to add capacity incrementally. A provider-managed volume or filesystem-native feature can be simpler when its snapshot and resize workflow already matches your operational needs.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

The new disk is missing from lsblk

This is a provider or guest-visibility problem, not an LVM problem. Confirm the attachment or resize completed in the provider control panel, check the VPS console, and re-run lsblk. Do not run pvcreate until the device is visible and identified.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

pvcreate warns that the device is in use

Stop and inspect lsblk, filesystem signatures, mount points, and existing PV output. You may be targeting an active filesystem, an existing PV, or the wrong disk. Do not force initialization to suppress the warning.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The VG has no free space

Run vgs and lvs. Either add a PV with pvcreate and vgextend, or reclaim and resize an intentionally oversized LV according to your filesystem’s supported procedure. Creating an LV does not add capacity; it consumes free extents.

The LV grew but df -hT did not

The filesystem layer was not grown. Identify the filesystem with df -hT or lsblk -f, then run resize2fs for ext4 or xfs_growfs against the mount point for XFS. Recheck both lvs and df -hT.

The mount disappears after reboot

Check the UUID and filesystem type in /etc/fstab. Run sudo blkid, correct the entry, and test with sudo mount -a. Use findmnt to confirm the expected source is mounted at the expected directory.

A snapshot suddenly becomes unusable

Inspect lvs for snapshot allocation. A classic snapshot can fill as the origin changes. Copy needed data to independent storage promptly, then remove and recreate the snapshot with a capacity appropriate for the backup window.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational checklist

  • Record provider disk changes and the device path visible to the guest.
  • Save a backup before destructive initialization or resizing.
  • Capture lsblk, pvs, vgs, and lvs before and after changes.
  • Use stable UUID-based mounts rather than assuming device names remain unchanged.
  • Keep intentional VG free space if you need future LVs or snapshots.
  • Grow the filesystem after growing the LV, and verify with df -hT.
  • Monitor snapshot usage and copy snapshots to storage independent of the source VPS.
  • Document the filesystem type, LV path, mount point, and recovery commands for the next operator.

Frequently Asked Questions

Can LVM make my VPS disk larger without changing the provider plan?

No. LVM can reorganize and allocate capacity that the guest already sees, but it cannot manufacture provider-side sectors. You must enlarge the virtual disk or attach another block device first.

Should I use a whole disk or a partition as the PV?

Either can be valid. The important requirement is consistency: identify the exact target, initialize only the intended unused disk or partition, and use that same PV path when resizing or troubleshooting. A partitioned PV adds a partition-resize step when the underlying disk grows.

Does creating an LVM snapshot replace a backup?

No. A snapshot is a point-in-time view on the same storage system. Copy its contents to independent storage and verify the copy; also monitor snapshot space because a full classic snapshot becomes unusable.

Can I extend an LV while it is mounted?

The LVM and filesystem tools may support online growth, but the filesystem command is type-specific. Follow the correct ext4 or XFS growth procedure and verify the mounted size afterward instead of assuming that an LV resize also resized the filesystem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.