The only agent that thinks for itself

Autonomous Monitoring with self-learning AI built-in, operating independently across your entire stack.

Unlimited Metrics & Logs
Machine learning & MCP
5% CPU, 150MB RAM
3GB disk, >1 year retention
800+ integrations, zero config
Dashboards, alerts out of the box
> Discover Netdata Agents

Centralized metrics streaming and storage

Aggregate metrics from multiple agents into centralized Parent nodes for unified monitoring across your infrastructure.

Stream from unlimited agents
Long-term data retention
High availability clustering
Data replication & backup
Scalable architecture
Enterprise-grade security
> Learn about Parents

Fully managed cloud platform

Access your monitoring data from anywhere with our SaaS platform. No infrastructure to manage, automatic updates, and global availability.

Zero infrastructure management
99.9% uptime SLA
Global data centers
Automatic updates & patches
Enterprise SSO & RBAC
SOC2 & ISO certified
> Explore Netdata Cloud

Deploy Netdata Cloud in your infrastructure

Run the full Netdata Cloud platform on-premises for complete data sovereignty and compliance with your security policies.

Complete data sovereignty
Air-gapped deployment
Custom compliance controls
Private network integration
Dedicated support team
Kubernetes & Docker support
> Learn about Cloud On-Premises

Powerful, intuitive monitoring interface

Modern, responsive UI built for real-time troubleshooting with customizable dashboards and advanced visualization capabilities.

Real-time chart updates
Customizable dashboards
Dark & light themes
Advanced filtering & search
Responsive on all devices
Collaboration features
> Explore Netdata UI

Monitor on the go

Native iOS and Android apps bring full monitoring capabilities to your mobile device with real-time alerts and notifications.

iOS & Android apps
Push notifications
Touch-optimized interface
Offline data access
Biometric authentication
Widget support
> Download apps

The future of infrastructure observability

See our strategic direction across AI-native observability, full-stack signals, operational intelligence, and enterprise platform maturity.

AI-native observability
Full-stack signal coverage
Operational intelligence
Enterprise platform maturity
Agent releases every 6 weeks
Cloud continuous delivery
> Explore Product Roadmap

Best energy efficiency

True real-time per-second

100% automated zero config

Centralized observability

Multi-year retention

High availability built-in

Zero maintenance

Always up-to-date

Enterprise security

Complete data control

Air-gap ready

Compliance certified

Millisecond responsiveness

Infinite zoom & pan

Works on any device

Native performance

Instant alerts

Monitor anywhere

AI-native observability

Continuous delivery

Open source foundation

80% Faster Incident Resolution

AI-powered troubleshooting from detection, to root cause and blast radius identification, to reporting.

True Real-Time and Simple, even at Scale

Linearly and infinitely scalable full-stack observability, that can be deployed even mid-crisis.

90% Cost Reduction, Full Fidelity

Instead of centralizing the data, Netdata distributes the code, eliminating pipelines and complexity.

See and Map Your Entire Network

Live topology, flow analytics, and SNMP device and trap monitoring — unified with your full-stack observability.

Control Without Surrender

SOC 2 Type 2 certified with every metric kept on your infrastructure.

Integrations

800+ collectors and notification channels, auto-discovered and ready out of the box.

800+ data collectors
Auto-discovery & zero config
Cloud, infra, app protocols
Notifications out of the box
> Explore integrations
Real Results
46% Cost Reduction

Reduced monitoring costs by 46% while cutting staff overhead by 67%.

— Leonardo Antunez, Codyas

Zero Pipeline

No data shipping. No central storage costs. Query at the edge.

From Our Users
"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

No Query Language

Point-and-click troubleshooting. No PromQL, no LogQL, no learning curve.

Enterprise Ready
67% Less Staff, 46% Cost Cut

Enterprise efficiency without enterprise complexity—real ROI from day one.

— Leonardo Antunez, Codyas

SOC 2 Type 2 Certified

Zero data egress. Only metadata reaches the cloud. Your metrics stay on your infrastructure.

Full Coverage
800+ Collectors

Auto-discovered and configured. No manual setup required.

Any Notification Channel

Slack, PagerDuty, Teams, email, webhooks—all built-in.

Built for the People Who Get Paged

Because 3am alerts deserve instant answers, not hour-long hunts.

Every Industry Has Rules. We Master Them.

See how healthcare, finance, and government teams cut monitoring costs 90% while staying audit-ready.

Monitor Any Technology. Configure Nothing.

Install the agent. It already knows your stack.
From Our Users
"A Rare Unicorn"

Netdata gives more than you invest in it. A rare unicorn that obeys the Pareto rule.

— Eduard Porquet Mateu, TMB Barcelona

99% Downtime Reduction

Reduced website downtime by 99% and cloud bill by 30% using Netdata alerts.

— Falkland Islands Government

Real Savings
30% Cloud Cost Reduction

Optimized resource allocation based on Netdata alerts cut cloud spending by 30%.

— Falkland Islands Government

46% Cost Cut

Reduced monitoring staff by 67% while cutting operational costs by 46%.

— Codyas

Real Coverage
"Plugin for Everything"

Netdata has agent capacity or a plugin for everything, including Windows and Kubernetes.

— Eduard Porquet Mateu, TMB Barcelona

"Out-of-the-Box"

So many out-of-the-box features! I mostly don't have to develop anything.

— Simon Beginn, LANCOM Systems

Real Speed
Troubleshooting in 30 Seconds

From 2-3 minutes to 30 seconds—instant visibility into any node issue.

— Matthew Artist, Nodecraft

20% Downtime Reduction

20% less downtime and 40% budget optimization from out-of-the-box monitoring.

— Simon Beginn, LANCOM Systems

Pay per Node. Unlimited Everything Else.

One price per node. Unlimited metrics, logs, users, and retention. No per-GB surprises.

Free tier—forever
No metric limits or caps
Retention you control
Cancel anytime
> See pricing plans

What's Your Monitoring Really Costing You?

Most teams overpay by 40-60%. Let's find out why.

Expose hidden metric charges
Calculate tool consolidation
Customers report 30-67% savings
Results in under 60 seconds
> See what you're really paying

Your Infrastructure Is Unique. Let's Talk.

Because monitoring 10 nodes is different from monitoring 10,000.

On-prem & air-gapped deployment
Volume pricing & agreements
Architecture review for your scale
Compliance & security support
> Start a conversation

Monitoring That Sells Itself

Deploy in minutes. Impress clients in hours. Earn recurring revenue for years.

30-second live demos close deals
Zero config = zero support burden
Competitive margins & deal protection
Response in 48 hours
> Apply to partner

Per-Second Metrics at Homelab Prices

Same engine, same dashboards, same ML. Just priced for tinkerers.

Community: Free forever · 5 nodes · non-commercial
Homelab: $90/yr · unlimited nodes · fair usage
> Get the Homelab Plan

$1,000 Per Referral. Unlimited Referrals.

Your colleagues get 10% off. You get 10% commission. Everyone wins.

10% of subscriptions, up to $1,000 each
Track earnings inside Netdata Cloud
PayPal/Venmo payouts in 3-4 weeks
No caps, no complexity
> Get your referral link
Cost Proof
40% Budget Optimization

"Netdata's significant positive impact" — LANCOM Systems

Calculate Your Savings

Compare vs Datadog, Grafana, Dynatrace

Savings Proof
46% Cost Reduction

"Cut costs by 46%, staff by 67%" — Codyas

30% Cloud Bill Savings

"Reduced cloud bill by 30%" — Falkland Islands Gov

Enterprise Proof
"Better Than Combined Alternatives"

"Better observability with Netdata than combining other tools." — TMB Barcelona

Real Engineers, <24h Response

DPA, SLAs, on-prem, volume pricing

Why Partners Win
Demo Live Infrastructure

One command, 30 seconds, real data—no sandbox needed

Zero Tickets, High Margins

Auto-config + per-node pricing = predictable profit

Homelab Ready
Free Video Course

8-episode Netdata tutorial by LearnLinux.tv

76k+ GitHub Stars

3rd most starred monitoring project

Worth Recommending
Product That Delivers

Customers report 40-67% cost cuts, 99% downtime reduction

Zero Risk to Your Rep

Free tier lets them try before they buy

AI Support Assistant, Available 24/7

Nedi has access to all official documentation, source code, and resources. Ask any question about Netdata—responds in your language.

Deployment & configuration
Troubleshooting & sizing
Alerts & notifications
Evidence-based answers
> Ask Nedi now

Never Fight Fires Alone

Docs, community, and expert help—pick your path to resolution.

Learn.netdata.cloud docs
Discord, Forums, GitHub
Premium support available
> Get answers now

60 Seconds to First Dashboard

One command to install. Zero config. 850+ integrations documented.

Linux, Windows, K8s, Docker
Auto-discovers your stack
> Read our documentation

76,000+ Engineers Strong

615+ contributors. 1.5M daily downloads. One mission: simplify observability.

Per-Second. 90% Cheaper. Data Stays Home.

Side-by-side comparisons: costs, real-time granularity, and data sovereignty for every major tool.

See why teams switch from Datadog, Prometheus, Grafana, and more.

> Browse all comparisons
Edge-Native Observability, Born Open Source
Per-second visibility, ML on every metric, and data that never leaves your infrastructure.
Founded in 2016
615+ contributors worldwide
Remote-first, engineering-driven
Open source first
> Read our story
Promises We Publish—and Prove
12 principles backed by open code, independent validation, and measurable outcomes.
Open source, peer-reviewed
Zero config, instant value
Data sovereignty by design
Aligned pricing, no surprises
> See all 12 principles
Edge-Native, AI-Ready, 100% Open
76k+ stars. Full ML, AI, and automation—GPLv3+, not premium add-ons.
76,000+ GitHub stars
GPLv3+ licensed forever
ML on every metric, included
Zero vendor lock-in
> Explore our open source
Build Real-Time Observability for the World
Remote-first team shipping per-second monitoring with ML on every metric.
Remote-first, fully distributed
Open source (76k+ stars)
Challenging technical problems
Your code on millions of systems
> See open roles
Meet the Team Behind Netdata
Conferences, meetups, and tradeshows where you can see Netdata in action and talk to the engineers who build it.
Live demos and deep dives
Book 1-on-1 meetings
Talks and panel sessions
Event recaps and photos
> See all events
Talk to a Netdata Human in <24 Hours
Sales, partnerships, press, or professional services—real engineers, fast answers.
Discuss your observability needs
Pricing and volume discounts
Partnership opportunities
Media and press inquiries
> Book a conversation
Your Data. Your Rules.
On-prem data, cloud control plane, transparent terms.
Trust & Scale
76,000+ GitHub Stars

One of the most popular open-source monitoring projects

SOC 2 Type 2 Certified

Enterprise-grade security and compliance

Data Sovereignty

Your metrics stay on your infrastructure

Validated
University of Amsterdam

"Most energy-efficient monitoring solution" — ICSOC 2023, peer-reviewed

ADASTEC (Autonomous Driving)

"Doesn't miss alerts—mission-critical trust for safety software"

Community Stats
615+ Contributors

Global community improving monitoring for everyone

1.5M+ Downloads/Day

Trusted by teams worldwide

GPLv3+ Licensed

Free forever, fully open source agent

Why Join?
Remote-First

Work from anywhere, async-friendly culture

Impact at Scale

Your work helps millions of systems

$ guides / lvm / lvm-metadata-corruption-vgcfgrestore ▌

Operations Guides

LVM metadata corruption recovery: vgcfgrestore from /etc/lvm/archive

LVM keeps the complete map of your logical volumes in a small metadata area at the start of each physical volume. If that metadata is corrupted, by a power loss during a metadata write or a bad sector in the first few megabytes of a PV, the entire volume group becomes unreadable. Every LV in the VG becomes inaccessible at once, regardless of how healthy the actual data extents are.

The recovery path is built into LVM itself. After every metadata change, LVM writes the current configuration to /etc/lvm/backup/<vg> and appends a timestamped copy to /etc/lvm/archive/. The vgcfgrestore command reads these files and rewrites the on-disk metadata. If you have a current archive, recovery is usually a matter of minutes. If you do not, it becomes a data recovery exercise.

This guide covers the full workflow: confirming corruption versus a missing device, choosing the correct archive, handling damaged PV headers, the thin pool complication, and the chicken-and-egg problem when /etc lives on the VG you are trying to restore.

How the archive and backup files work

LVM metadata on disk lives in the volume group descriptor area at the start of each PV, stored as a text-based ring buffer that retains recent metadata versions until old entries are overwritten. The VG metadata carries a sequence number (seqno) that increments on every metadata-modifying operation: LV create, extend, remove, snapshot, pvmove, and so on.

On every change, LVM also writes two files on the root filesystem:

  • /etc/lvm/backup/<vg>: the current metadata, one file per VG. This is what vgcfgrestore uses when you do not specify a file.
  • /etc/lvm/archive/<vg>_<NNNNN>-<hash>.vg: timestamped history of metadata states. Each archive records the state before a specific change was applied.

Archive retention is controlled by the backup section of /etc/lvm/lvm.conf. The defaults keep a minimum of 10 archive files and purge files older than 30 days, so do not assume an archive from last quarter still exists.

You can inspect backup freshness at any time:

# Compare the backup file's seqno with the live VG seqno
grep seqno /etc/lvm/backup/<vg>
vgs --noheadings -o vg_name,vg_seqno

# See the archive history
ls -lt /etc/lvm/archive/ | head -20

If the backup seqno is behind the live seqno, something is preventing backups (read-only /etc, full filesystem, permissions), and your recovery gap is already growing.

Confirm it is corruption, not a missing device

Before restoring anything, rule out the two conditions that look like metadata corruption but are not.

First, verify all PVs are present. vgck requires all PV devices to be accessible, and a missing PV causes it to fail for reasons unrelated to corruption. Second, check for underlying device errors. If dmesg shows ongoing I/O errors on the PV device, you have a hardware problem and restoring metadata onto a dying device will not help.

# Check for missing PVs and partial VGs
pvs -o pv_name,vg_name,pv_attr,pv_size,pv_free
vgs -o vg_name,vg_attr

# Verify metadata consistency (non-zero exit means a problem)
vgck -v <vg>

# Rule out device failure
dmesg | grep -i 'I/O error' | tail -20

The corruption diagnosis is strongest when all PVs are present and readable at the block level, but vgck fails, vgs/lvs report metadata errors, and multiple LVs refuse to activate. If instead a PV shows as [unknown], you are dealing with a missing device, which is a different recovery path. See LVM Couldn’t find device with uuid.

One caution before any write operation: if the underlying device has hardware-level corruption (an SSD with FTL remap problems, for example), image the device first. Writes to a device with address-translation corruption can land in the wrong physical location and destroy the data you are trying to save.

The recovery workflow

The restore has one branching decision: whether the PV header itself is damaged. If the header is intact and only the metadata area is stale or inconsistent, vgcfgrestore alone is enough. If the header is gone (for example, someone ran pvcreate on the device, or the first sectors are destroyed), you must rebuild the header with the original UUID before restoring the metadata into it.

flowchart TD
  A[VG unreadable, vgck fails] --> B{All PVs present and readable?}
  B -- No --> C[Missing PV or device failure - different recovery path]
  B -- Yes --> D{PV header damaged?}
  D -- Yes --> E[pvcreate --uuid --restorefile to rebuild header]
  D -- No --> F[vgcfgrestore --list VG]
  E --> F
  F --> G[Select archive by seqno and description]
  G --> H[vgcfgrestore --test -f file VG]
  H --> I[vgcfgrestore -f file VG - add --force for thin pools]
  I --> J[vgchange -ay VG, then verify]

Step 1: List the available archives

# List all archived metadata states for the VG
vgcfgrestore --list <vg>

Each entry shows the archive file, a timestamp, and a description line of the form “Created before executing ’lvcreate …’” or similar. That description tells you exactly which operation each archive precedes.

Step 2: Choose the right seqno

You want the archive that represents the most recent good state: the one just before the corruption event, not the oldest one and not blindly the newest one.

The risk of choosing wrong is real. If you restore an archive from before a legitimate lvextend, the extent map in the restored metadata will point logical extents at physical extents that no longer match the on-disk layout. Data written after that extend will be read back from the wrong offsets. Read the description lines and reconstruct the timeline: what was the last operation you know succeeded, and what happened around the time things broke.

Step 3: Dry-run the restore

# Test restore without writing anything
vgcfgrestore --test -f /etc/lvm/archive/<vg>_00042-1234567890.vg <vg>

The --test flag validates the file and reports what would be restored without touching the PVs. If the dry run reports inconsistencies, stop and pick a different archive.

Step 4: Rebuild the PV header if needed (only when damaged)

Skip this step if the PV header is intact. If the header is destroyed, recreate it with the original UUID, which is recorded inside the archive file:

# Rebuild the PV header using the UUID recorded in the archive
pvcreate --uuid <original-pv-uuid> --restorefile /etc/lvm/archive/<vg>_00042-1234567890.vg /dev/<device>

This is a destructive write to the start of the device. Double-check the device path and the UUID. Running pvcreate without --restorefile and the original UUID creates a new, empty PV and discards your ability to rejoin the existing VG cleanly. Repeat per damaged PV, then run vgcfgrestore as below.

Step 5: Restore the metadata

# Restore the selected archive onto the VG
vgcfgrestore -f /etc/lvm/archive/<vg>_00042-1234567890.vg <vg>

If the VG contains thin pools, vgcfgrestore requires --force, and this is where you need to think hard. Changes to thin pool kernel metadata cannot be reverted. If thin metadata has changed since the archive was written (new blocks allocated, snapshots created or removed), the restored VG metadata may not match the pool’s internal metadata, and data loss can follow. Prefer the newest archive that is still consistent, and treat --force on a production thin pool as a decision you make after exhausting other options, not a reflex.

Step 6: Activate and verify

# Activate the restored VG
vgchange -ay <vg>

# Verify
vgs -o vg_name,vg_attr,vg_seqno
lvs -o lv_name,vg_name,lv_attr,lv_active
vgck -v <vg>

A warning about inconsistent metadata right after the restore is normal when PVs carried different seqno values. LVM resolves this by selecting the highest seqno. If the inconsistency persists, synchronize metadata across the PVs:

# Rewrite consistent metadata across all PVs
vgck --updatemetadata <vg>

vgck --updatemetadata exists since LVM2 2.03.05 (2019); older 2.02-era releases, such as RHEL 7’s, do not have it.

After activation, check that LVs map to the devices you expect and that filesystems mount cleanly. Run a filesystem check (fsck -n for ext4, xfs_repair -n for XFS) read-only first rather than mounting straight into production. A successful metadata restore does not guarantee the data extents were untouched by whatever corrupted the metadata.

Common pitfalls

  • Restoring the wrong archive. The newest file is not automatically correct. If corruption happened during an operation, the archive written before that operation is the last known-good state. Read the description lines.
  • Restoring across a legitimate resize. An archive older than a successful lvextend produces an extent map that disagrees with reality. If you must use an older archive, plan on filesystem-level verification before trusting any data.
  • Forgetting --force on thin pools, or using it blindly. The flag is mandatory for VGs with thin pools, and it bypasses safety checks. The thin metadata in the kernel must match the restored VG metadata precisely.
  • Assuming vgcfgrestore undoes data destruction. It restores metadata, not data. If issue_discards = 1 is set in lvm.conf, an lvremove on an SSD may already have TRIMmed the blocks. No metadata restore brings that back.
  • Running pvcreate casually on a VG member. It overwrites the descriptor area. If the on-disk metadata ring is small, no prior copy survives to recover from.
  • Trusting a 30-day-old mental model of the archive. Default retention prunes old archives. Verify /etc/lvm/archive/ contents during routine operations, not during the incident.

The chicken-and-egg problem: when /etc is on the affected VG

The archive and backup files live on the root filesystem. If your root filesystem is itself an LV on the corrupted VG, the files you need to restore the VG are inside the VG you cannot read. The system may not even boot.

Solve this before the incident:

  • Keep an off-volume copy. Back up /etc/lvm/backup/ and /etc/lvm/archive/ to another host, configuration management, or object storage on a schedule and after every deliberate LVM change.
  • Export explicitly after major operations. vgcfgbackup -f <path-on-different-storage> <vg> writes a metadata copy wherever you point it. The playbook signal for this is backup freshness: compare the seqno in your latest external copy against vgs -o vg_seqno.
  • Boot from rescue media. With an off-volume copy, boot a rescue image, place the archive file where vgcfgrestore can read it, and run the workflow above.
  • Last resort without any archive. The metadata text also exists in the on-disk descriptor area ring buffer on each PV. pvck --dump metadata_search /dev/<device> can extract metadata text from the device when no file copy exists at all. This is slower and more fragile than restoring from a file, which is why the off-volume copy matters.

Signals to monitor

Metadata corruption is rare, but the conditions that make recovery easy or impossible are observable long before the event.

SignalWhy it mattersWarning sign
vgck exit code per VGCatches metadata inconsistency early, while archives are freshAny non-zero exit
Backup seqno vs live VG seqnoStale backups mean a growing recovery gap/etc/lvm/backup/<vg> seqno behind vgs -o vg_seqno
Archive directory stateDefines your recovery windowNewest archive file days old, or directory empty
LV activation stateCorruption surfaces as LVs that will not activateExpected-active LVs inactive after boot
Kernel I/O errors on PV devicesDistinguishes hardware failure from logical corruptionI/O errors in dmesg against a PV device

Run vgck periodically (from a cron job or your monitoring system) rather than waiting for activation failures. Corruption caught while the VG is still functioning gives you time to restore cleanly instead of under incident pressure.

How Netdata helps

  • Block device error visibility. Netdata collects disk-level I/O errors and latency, so you can correlate a vgck failure with hardware errors on the underlying PV and tell corruption apart from a dying disk.
  • LV and filesystem state in one place. Mount points disappearing, filesystems going read-only, and dm device behavior changing at the same timestamp narrows the blast radius to a specific VG quickly.
  • Boot-to-boot comparison. Per-second metrics retained across reboots let you see whether LVs failed to activate at boot or dropped later, which separates metadata problems from activation-ordering problems.
  • Alerting on filesystem and device anomalies gives you the early page when a VG silently degrades, before someone notices missing data.
  • Correlating D-state processes with device errors helps confirm whether an unresponsive LVM command is a symptom of the corruption event itself.