Create swap from File on BTRFS Filesystem

I had a server run out of space recently, to the point that it couldn’t complete the yum update. This server ended up corrupting a yum packages database.

Here’s how corrupted YUM database looks

Correctly called rpmdb, packaged database used by YUM looks like this when it can’t be opened:

root@s3:/ # yum update
error: db5 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db5 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

Rebuilding RPM DB

The fix is to rebuild the RPM database, like this:

root@s3:/ # rpm --rebuilddb

and just to try things, do the same yum update – it should work now:

root@s3:/backup/linux # yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

- base: centos.mirror.ate.info
- epel: mirror.1000mbps.com
- extras: rep-centos-fr.upress.io
- updates: centos.mirror.ate.info
  Resolving Dependencies
  ...
  

See Also




Contact Me

Follow me on Facebook, Twitter or Telegram:
Recommended
I learn with Educative: Educative
IT Consultancy
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!
Recent Articles
03 Sep 2024

macOS Sequoia 15.0

02 Sep 2024

Video: Has This Worked Before?

24 Mar 2024

Homelab: Mac Pro 2013 32GB

Recent Tweets