You are not logged in.

#1 2003-10-17 10:15:36

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 552

/var/lib/pacman crashed

Hi,

yesterday my filesystem crashed. /var has its own partition. This particulaur
partition crashed. fsck left me with a corrupted /var/lib/pacman. Some
entries are deleted. Installing new packages or making new packages fails
due to some not fullfilled dependencies. In fact this packages are installed.
Now, whenever a dependency is missed I can easily make pacman -Sf package.
This helps, but I like to have an repaired database. Any idea/hack is welcome!

Thanks neri

Offline

#2 2003-10-17 15:40:11

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: /var/lib/pacman crashed

There is no other list of installed packages... unless you wanted to do a 'find / -exec pacman -Qo ;' and parse through to see which files aren't owned by anything, then figure out which package installs those files, I can't think of any other way to do that.  /var/lib/pacman is kind of important (well, at least /var/lib/pacman/local... the others are just from uncompressing unofficial.db.gz, etc).


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#3 2003-10-17 17:58:36

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: /var/lib/pacman crashed

This has happened to a couple other people.  I've always recommended a cronjob that tars up your /var/lib/pacman/local once a night.

Would you guys want this set up on a default install, or is this better left to the administrator of the system?

Offline

#4 2003-10-17 22:58:29

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 552

Re: /var/lib/pacman crashed

Hi,

apeiro wrote:

This has happened to a couple other people.  I've always recommended a cronjob that tars up your /var/lib/pacman/local once a night.

Would you guys want this set up on a default install, or is this better left to the administrator of the system?

Ok, I got to get myself together. Such a bottle of chianto classico is
recomended on casual times. It leaves you with a pleasant loss of gravity.
Regarding your question. I use this particular box as my desktop and boot it
every day. I did a pacman -Syu at this time booting it. You mentioned other
people also had a crashed file system. Maybe it is something in pacman,
maybe something in the tools used by pacman (tar etc.) Is it possible to
contact other with the same problem? If it occurs more often it should be
investigated.
Xentacs post (thanks for that) made me thinking. Maybe it's possible to
write a shellscript, which uses pacman, the untared package db and the
find command to restore the local db. It is for experiencend users 'cause
there is no chance to handle manually installed files (such as nvidia driver
install script) automatically.
Should we have a cron job by default? Why not, it doesn't hurt. Loosing
your local db does hurt. I experienced that. At least, it is _very_ annoying.

I will think about the shellscript when I'm back to 9.81m/s*s. That's for
now. Time to go to bed. See ya tomorrow.

bye neri

ps. apeiro, I'm not offending mentioning pacman as possible source. The
chance that it is related to the problem is very little. Maybe it is something
else. For example, it happened on a true SMP box. Could there be race
conditions in tar? I don't know. If there are probs they are gonna be really
hard to track down. We just shouldn't exclude until we really know. Just
let's keep an eye open. smile

Offline

#5 2003-10-18 01:03:41

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: /var/lib/pacman crashed

i was the cause of losing my /var/lib.

two stupid mistakes in december forced me to reinstall my root partition twice. never work as root while tired.


AKA uknowme

I am not your friend

Offline

#6 2003-10-20 04:02:45

Xentac
Forum Fellow
From: Victoria, BC
Registered: 2003-01-17
Posts: 1,797
Website

Re: /var/lib/pacman crashed

I would prefer not to have a cron job by default.  I'd say it's up to the system administrator.  I don't know if you everyone would consider that a good use of space...

But in the documentation it'd probably be a good idea to mention it.


I have discovered that all of mans unhappiness derives from only one source, not being able to sit quietly in a room
- Blaise Pascal

Offline

#7 2003-10-20 06:07:40

hApy
Member
From: Victoria, BC
Registered: 2003-04-13
Posts: 194
Website

Re: /var/lib/pacman crashed

I agree it should be in the documentation.

How large would a tar.gz of the db be?

If it's not very large / time consuming / cpu consuming to create I would vote make it default behaviour.

Hapy.

Offline

#8 2003-10-20 19:47:40

neri
Forum Fellow
From: Victoria, Canada
Registered: 2003-05-04
Posts: 552

Re: /var/lib/pacman crashed

Hi,

hApy wrote:

I agree it should be in the documentation.
How large would a tar.gz of the db be?

The documentation idea is excellent. I tried to compress /var/lib/pacman/local -
it was less than a second, ends up with 500k (no KDE, but gnome, xfce4, some
multimedia stuff, etc).
Another idea is that: The db is only touched, when pacman is called with
-S -F -A -R -U switch. Maybe pacman can call tar to make a backup after
beeing in use which one of these switches. Another question is, if this
backup is a default, where to should it be saved? /root ?

trying to write that script I stuck at the very initial problem. The idea was
to built two lists to compare:
list one is find / type -f and second one ist pacman -Ql
Now i can not think of any way to find automatically detect the package
which was the source of an orphan.

So I will reinstall that box tomorrow and stay with sarahs idea: Don't
work as root when tired. Maybe this should be in documentation as well wink

So far folks, good night,
neri

Offline

#9 2003-10-24 12:14:59

Gyroplast
Member
From: Germany
Registered: 2002-09-03
Posts: 166
Website

Re: /var/lib/pacman crashed

But in the documentation it'd probably be a good idea to mention it...

I agree it should be in the documentation...

The documentation idea is excellent...

Okay, okay, I hear you already! smile


"That's the problem with good advice. Nobody wants to hear it."
-- Dogbert

Offline

Board footer

Powered by FluxBB