Site icon New Generation Enterprise Linux

Stop trusting your disk snapshots until you’ve actually looked inside

Backup, Snapshotting & Disaster Recovery

Stop trusting your disk snapshots until you’ve actually looked inside

Technical Briefing | 10/28/2026

You’ve got snapshots enabled on your cloud volumes. Or maybe you’re using LVM snapshots for your critical databases. That’s a good start. But here’s the kicker: just because you have a block-level snapshot doesn’t mean it’s actually *recoverable*. I’ve seen more than one production incident where a team went to restore from a perfectly good-looking snapshot, only to find the filesystem on it was corrupted, or worse, the application data inside was garbage. It’s a nasty surprise, especially when you’re already in a fire-fighting mood.

Filesystem Consistency Isn’t Automatic

Think about what a block snapshot is: it’s a point-in-time copy of the disk blocks. If your filesystem was actively writing data when that snapshot was taken, those blocks might be in an inconsistent state. The journal might be half-written, metadata could be out of sync with actual file data. EXT4 and XFS are pretty good at recovery, but they can’t work miracles. And honestly, running `xfs_repair` on a restored system after a disaster feels like a failure, not a recovery. That’s why tools like `fsfreeze` exist. You temporarily stop filesystem writes, take your snapshot, and then unfreeze. It’s a simple step, but most tutorials skip it.

But What About the Applications?

Even with a clean filesystem, your applications might still be in a bad state. Databases are the poster child for this pain. If your database engine was mid-transaction when the block snapshot hit, even a filesystem-consistent snapshot won’t save you from application-level corruption. You’ll need to use database-specific methods: `pg_start_backup()` for PostgreSQL, `FLUSH TABLES WITH READ LOCK` or `mysqldump –single-transaction` for MySQL, or similar mechanisms for whatever else you’re running. These quiesce the application, ensuring its internal state is coherent at the moment of the snapshot. But even after all that, there’s one critical step people often miss.

The Real Test: Peeking Inside

The only way to *know* your snapshot is good is to actually verify it. You need to simulate a restore. Spin up a new VM, attach the snapshot volume, and mount it. But mount it read-only first! This prevents you from accidentally messing with your ‘golden’ backup, and it’s a good habit anyway. Once it’s mounted, you need to actually poke around. Run some `ls -R`, check file permissions, look at key configuration files, maybe even run a checksum on a few important binaries. This is where you catch those silent failures *before* they bite you in production.

lvchange -ay vg0/myapp_snap
mkdir -p /mnt/snapshot_check
mount -o ro /dev/vg0/myapp_snap /mnt/snapshot_check


# Perform checks:
ls -l /mnt/snapshot_check/etc/myapp/config.yaml
grep "bind_address" /mnt/snapshot_check/etc/myapp/config.yaml
find /mnt/snapshot_check/var/lib/myapp/data -maxdepth 1 -print


# Clean up:
umount /mnt/snapshot_check
rmdir /mnt/snapshot_check
lvchange -an vg0/myapp_snap
  • Can you actually mount the filesystem successfully and without errors?
  • Are critical application configuration files present and readable?
  • Are expected data directories and key files within them present?
  • Does the content of a representative sample of data look sane (e.g., last 10 lines of a log, count of entries in a data directory)?
  • Do file permissions and ownerships look correct for critical binaries or data files?

This isn’t just theory for blog posts; it’s a real part of a robust disaster recovery plan. Building out automated tests that periodically spin up a small instance, attach a recent snapshot, perform these checks, and report back isn’t overkill. It’s preventing the ultimate bad day. You don’t want to find out your recovery strategy is flawed only when your primary system is already in flames. Do the work now, and sleep better later.

Linux Admin Automation  |  © www.ngelinux.com  |  10/28/2026
0 0 votes
Article Rating
Exit mobile version