LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-11-2013, 12:40 AM   #1
windstory
Member
 
Registered: Nov 2008
Posts: 486

Rep: Reputation: 36
Error: rpmdb open failed


My box is SCience Linux 6.3 x64, and I got this error message.

Quote:
[root@maestro Documents]# yum -y update
error: db3 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

Please let me know how to resolve this.

Thanks in advance.
 
Old 07-11-2013, 12:51 AM   #2
Linux MR
Member
 
Registered: May 2013
Location: Pacific North West
Distribution: Red Hat, Scientific, Fedora, openSuSE, Mageia, Mint, Arch
Posts: 57

Rep: Reputation: Disabled
The common fix is to delete the rpm databases and run rebuilddb, like

Quote:
# yum clean all
# rm -f /var/lib/rpm/__db*
# rpm --rebuilddb
# yum update
Hope that helps
 
1 members found this post helpful.
Old 07-11-2013, 01:26 AM   #3
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
The problem is a corrupted rpm database, mostly coming into existence because of an aborted update process. It also happens sometimes when the package containing rpm itself is updated.

The solution is to delete and then rebuild the database:

Code:
# rm -f /var/lib/rpm/__db.[0-9][0-9]*
# rpm --quiet -qa
I hope this helps.
 
1 members found this post helpful.
Old 07-11-2013, 04:59 AM   #4
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by Linux MR View Post
The common fix is to delete the rpm databases and run rebuilddb, like
Hope that helps
The result is here.

Quote:
[root@maestro Documents]# yum clean all
error: db3 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@maestro Documents]# rm -f /var/lib/rpm/__db*
[root@maestro Documents]# rpm --rebuilddb
error: failed to create directory /var/lib/rpmrebuilddb.2843: No space left on device
[root@maestro Documents]# yum update
rpmdb: write: 0x1394b30, 8192: No space left on device
Bus error

eklavya/

The result is here.

Quote:
[root@maestro Documents]# rpm --quiet -qa
rpmdb: write: 0x1f9cac0, 8192: No space left on device
Bus error

Last edited by windstory; 07-11-2013 at 05:01 AM.
 
Old 07-11-2013, 06:27 AM   #5
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
Did you check for the availability of free disk space on the filesystem where /var is hosted. While installing/updating, yum caches downloaded files to /var/cache/yum directory. If enough space is not available in /var filesystem, then yum will fail.
 
1 members found this post helpful.
Old 07-11-2013, 07:48 AM   #6
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by mddesai View Post
Did you check for the availability of free disk space on the filesystem where /var is hosted. While installing/updating, yum caches downloaded files to /var/cache/yum directory. If enough space is not available in /var filesystem, then yum will fail.
How to check for the availability of free disk space on the filesystem?
 
Old 07-11-2013, 07:52 AM   #7
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
Code:
df -h
 
1 members found this post helpful.
Old 07-11-2013, 07:59 AM   #8
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Quote:
Originally Posted by mddesai View Post
Code:
df -h
The result is this.

Quote:
[root@maestro Documents]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_maestro-lv_root
26G 26G 0 100% /
tmpfs 435M 72K 435M 1% /dev/shm
/dev/sda1 485M 64M 396M 14% /boot
 
Old 07-11-2013, 08:07 AM   #9
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
Code:
[root@maestro Documents]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_maestro-lv_root
26G 26G 0 100% /
tmpfs 435M 72K 435M 1% /dev/shm
/dev/sda1 485M 64M 396M 14% /boot
There you go, out of 26GB, your '/' file system has '0' space available and has been used full 100%. If you have no dedicated filesystem for /var, then /var is hosted in /

Delete some unwanted files anywhere in '/' filesystem to make room for yum to cache downloaded files.

Last edited by mddnix; 07-11-2013 at 08:08 AM.
 
1 members found this post helpful.
Old 07-11-2013, 08:14 AM   #10
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
I've found out my problem. I've copied 30G hdd which is installed Scientific Linux to 250G hdd. Then I got this sturcture of hdd as attached. I have 218G free space.

Please let me know how to include this free space into LVM.
Attached Thumbnails
Click image for larger version

Name:	20130711 - move.png
Views:	127
Size:	111.4 KB
ID:	12921  
 
Old 07-11-2013, 09:05 AM   #11
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
You can follow these steps. Here I'll assume you want add available free space(218 gb) to existing Logical Volume '/dev/mapper/vg_maestro-lv_root'

Step 1: Make a partition and mark that partition as 0x8e from available free space.
Code:
# fdisk /dev/sda

Command (m for help): n

Command action
   e   extended
   p   primary partition (1-4)
p

Partition number (1-4):3

First cylinder....: <ENTER>
Last cylinder.....: <ENTER>

Command (m for help): t

Partition number (1-4): 3

Hex code (type L to list codes): 8e

Command (m for help): w
Step 2: Re-read The Partition Table
Code:
# partprobe /dev/sda
Step 3: Create Physical Volume
Code:
# pvcreate /dev/sda3
Step 4: Add Physical volume to Volume Group
Code:
# vgextend vg_maestro /dev/sda3
Step 5: Extend Logical Volume (/)
Code:
# lvextend -l +100%FREE /dev/vg_maestro/lv_root
# resize2fs -f /dev/vg_maestro/lv_root
# sync
Step 6: Reboot
Code:
# reboot
You're done. Be carefull though, LVM is little headache.
 
1 members found this post helpful.
Old 07-11-2013, 09:44 AM   #12
windstory
Member
 
Registered: Nov 2008
Posts: 486

Original Poster
Rep: Reputation: 36
Thanks a lot!
It works.

The result is at the attached picture, and this.


Quote:
[root@maestro Documents]# fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0003efaa

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 3917 30944256 8e Linux LVM
/dev/sda3 3918 30401 212732730 3 XENIX usr
/dev/sda4 3917 3917 6022+ 83 Linux

Partition table entries are not in disk order

Disk /dev/mapper/vg_maestro-lv_root: 245.3 GB, 245291286528 bytes
255 heads, 63 sectors/track, 29821 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000


Disk /dev/mapper/vg_maestro-lv_swap: 4227 MB, 4227858432 bytes
255 heads, 63 sectors/track, 514 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
And the "yum -y update" command is working now.

I appreciate you for kind and detailed guide.
Attached Thumbnails
Click image for larger version

Name:	20130711 - sl_move.png
Views:	85
Size:	108.5 KB
ID:	12922  
 
Old 07-11-2013, 10:55 AM   #13
mddnix
Member
 
Registered: Mar 2013
Location: Bangalore, India
Distribution: Redhat, Arch, Ubuntu
Posts: 505

Rep: Reputation: 137Reputation: 137
Glad it helped
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Pirut Rpmdb open fail - tried to install software now cant open system LinuxGarcia Linux - Newbie 1 02-03-2009 06:41 PM
rpmDB error - How to solve problem? arindom Linux - Desktop 2 12-25-2006 07:06 AM
TypeError: rpmdb open failed Red Knuckles Fedora 8 11-05-2006 02:40 PM
rpmdb: PANIC error, please tell me what it means natbrazil Fedora 3 02-09-2005 06:32 PM
rpmdb error acid_kewpie Linux - General 0 02-02-2002 08:27 AM


All times are GMT -5. The time now is 04:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration