Page 1 of 1

[Solved] rpmdrake breakdown after disk full

PostPosted: Dec 23rd, '19, 07:42
by wonder6908
Hi everyone,

I am seeking help with system update/upgrade of my mageia 6 system. My /var partition was full a couple of weeks ago, filled with garbage produced by ntopng. I had to delete the garbage and make the system run as I was trying to run a system update. But after that, I notice the system update with rpmdrake always hangs somewhere. Then I removed all the media and tried to add the media repositories back, but the adding process will also hang. I tried all addmedia or rpmdrake related stuff, but no luck so far. I am guessing something was probably going wrong with perl installation when the disk was full. At this stage, I cannot even upgrade to mageia 7. Can anyone help? Thank you very much.

Re: rpmdrake breakdown after disk full

PostPosted: Dec 23rd, '19, 18:18
by doktor5000
What about a system update with urpmi? Also, can you still query your rpm database, what is the output of
Code: Select all
rpm -qa
rpm -qa --last|head
and does the latter output match with the most recently installed/updated packages ?

Re: rpmdrake breakdown after disk full

PostPosted: Dec 28th, '19, 13:17
by wonder6908
doktor5000 wrote:What about a system update with urpmi? Also, can you still query your rpm database, what is the output of
Code: Select all
rpm -qa
rpm -qa --last|head
and does the latter output match with the most recently installed/updated packages ?



Yes, query with rpm -qa still works. The last update output was all about rpm updates dated 24 Oct 2019.
Code: Select all
lib64rpmbuild7-4.13.1-3.3.mga6.x86_64         Thu 24 Oct 2019 10:32:34 AM CST
urpmi-parallel-ssh-8.110.2-1.mga6.noarch      Thu 24 Oct 2019 10:32:33 AM CST
rpm-sign-4.13.1-3.3.mga6.x86_64               Thu 24 Oct 2019 10:32:33 AM CST
gurpmi-8.110.2-1.mga6.noarch                  Thu 24 Oct 2019 10:32:33 AM CST
lib64rpmsign7-4.13.1-3.3.mga6.x86_64          Thu 24 Oct 2019 10:32:32 AM CST
urpmi-8.110.2-1.mga6.noarch                   Thu 24 Oct 2019 10:23:22 AM CST
rpm-plugin-systemd-inhibit-4.13.1-3.3.mga6.x86_64 Thu 24 Oct 2019 10:23:21 AM CST
rpm-plugin-syslog-4.13.1-3.3.mga6.x86_64      Thu 24 Oct 2019 10:23:21 AM CST
rpm-plugin-ima-4.13.1-3.3.mga6.x86_64         Thu 24 Oct 2019 10:23:21 AM CST
rpm-build-4.13.1-3.3.mga6.x86_64              Thu 24 Oct 2019 10:23:21 AM CST


This seems to be right. According to the file time stamp of /var/lib/rpm/Packages, Oct 24 is the last update date.

urpmi hangs for performing either update or adding repository media.

Thanks for your help.

Re: rpmdrake breakdown after disk full

PostPosted: Dec 28th, '19, 23:02
by doktor5000
I'd suggest to clear out the following directories, then try again after urpmi.removemedia -a afterwards :

Code: Select all
$ rpm -ql urpmi|grep ^/var
/var/cache/urpmi
/var/cache/urpmi/headers
/var/cache/urpmi/partial
/var/cache/urpmi/rpms
/var/lib/urpmi

Re: rpmdrake breakdown after disk full

PostPosted: Dec 29th, '19, 05:28
by wonder6908
doktor5000 wrote:I'd suggest to clear out the following directories, then try again after urpmi.removemedia -a afterwards :

Code: Select all
$ rpm -ql urpmi|grep ^/var
/var/cache/urpmi
/var/cache/urpmi/headers
/var/cache/urpmi/partial
/var/cache/urpmi/rpms
/var/lib/urpmi



Thanks for the suggestions. I did that and removed all media. And then found I cannot add media back. Just tried again, and it's the same result. I am trying to add media now but the process is just lying in the background, not doing anything. The only progress I see is that it created the media.cfg file in /var/urpmi/partial and mirrors.cache in /var/urpmi. Here are the processes in the system:

Code: Select all
root     22954  0.0  0.0 137852  9664 ?        SN   04:23   0:00 rpm -qa --qf %{NAME}-%{VERSION}-%{RELEASE}\n
root     32315  0.0  0.0 111856  5272 ?        S    11:08   0:00 sudo urpmi.addmedia --distrib --mirrorlist $MIRRORLIST
root     32316  0.0  0.1 215552 40992 ?        S    11:08   0:00 /usr/bin/perl /sbin/urpmi.addmedia --distrib --mirrorlist $MIRRORLIST


In addition, I cannot install or update a package already downloaded to my local disk with rpm. It simply hangs as urpmi does.

I suspect that it has to do with perl. Ever since the system update/upgrade on Oct 24, all following upgrades have failed.

Any idea? Thanks a lot.

Re: rpmdrake breakdown after disk full

PostPosted: Dec 29th, '19, 09:48
by isadora
Please place command-output between [CODE]-tags, to improve readability, thanks ahead!!! ;)
Demo: ftp://ftp5.gwdg.de/pub/linux/mandriva/m ... e_tags.ogv

Re: rpmdrake breakdown after disk full

PostPosted: Dec 29th, '19, 16:00
by doktor5000
wonder6908 wrote:In addition, I cannot install or update a package already downloaded to my local disk with rpm. It simply hangs as urpmi does.

I suspect that it has to do with perl.


If it doesn't work with rpm, then it's not a perl issue per se. You should try to take a look at http://rpm.org/user_doc/db_recovery.html
It also explains how to check for stale locks or open filehandles, which is what you should try to do.

Re: rpmdrake breakdown after disk full

PostPosted: Jan 3rd, '20, 10:14
by wonder6908
Yes, this solves the problem. Thank you! It turns out DNF has been somehow running in the background. It should be mentioned that the instructions in the above link has been obsolete since many commands are no longer available in the latest version of rpmdb.

Re: rpmdrake breakdown after disk full

PostPosted: Jan 3rd, '20, 17:20
by doktor5000
Well, problem is that this document seems to be the only one available from upstream rpm, so I prefer to link to that as it's basically the authoritative documentation. Also it applies to the latest rpm4 upstream version, where our maintainer might have decided that not all lowlevel tools are necessary. But it also shows some context information, how to check for stale locks and how to check for other processes that are accessing the rpm db.

Please don't forget to mark the thread solved by editing the subject of the first post and prefix it with [SOLVED], thanks in advance.

Re: rpmdrake breakdown after disk full

PostPosted: Jan 4th, '20, 05:02
by wonder6908
Great! Thanks for the explanation. I appreciate it.

Re: [Solved] rpmdrake breakdown after disk full

PostPosted: Jan 4th, '20, 16:36
by doktor5000
You're welcome :)

Problem is that most people asking here are only interested in solutions, not in understanding the actual issue or in learning.
If anything is unclear, I do usually like when people ask for context information or for some explanation instead of only wanting to know how to fix things ...