Skip to content

LVM Snapshots

Overview

StarkOne can create, restore, and delete LVM (Logical Volume Manager) snapshots for point-in-time server backups. Snapshots are nearly instant and don't require stopping services.

All LVM endpoints require superuser.

Listing Snapshots

GET /api/system/snapshots

Response:

{
  "data": [
    {
      "name": "starkone-snap-20240115",
      "size": "10G",
      "created": "2024-01-15T10:00:00Z",
      "vg": "vg0",
      "lv": "root"
    }
  ]
}

Creating a Snapshot

POST /api/system/snapshots
{
  "name": "before-upgrade",
  "size": "5G"
}

If size is omitted, the panel uses a sensible default (typically 5-10 GB depending on available space).

Restoring a Snapshot

POST /api/system/snapshots/:name/restore

Danger

Restoring a snapshot reverts the entire volume to its state at the time of the snapshot. All changes made after the snapshot was taken are lost.

Deleting a Snapshot

DELETE /api/system/snapshots/:name

Extending the Logical Volume

Extend the LV using free space in the volume group:

POST /api/system/lvm/extend
{
  "size": "+5G"     # Extend by 5 GB
  # or:
  "size": "100%FREE" # Use all free space
}

Tip

If your cloud provider gives you a larger disk but the filesystem hasn't grown: 1. Use Refresh in the LVM panel to re-scan for new space 2. Run extend to claim the free space 3. The filesystem is resized automatically (resize2fs / xfs_growfs)