Gentoo Archives: gentoo-dev

From: Rich Freeman <rich0@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] recovering from corrupted vdb
Date: Thu, 03 Nov 2011 12:00:10
Message-Id: CAGfcS_=5PdhM2=Qxezde9-6=7+uzpuS3CUusuWpuKR=vK4uE_A@mail.gmail.com
In Reply to: [gentoo-dev] recovering from corrupted vdb by "Paweł Hajdan
1 On Thu, Nov 3, 2011 at 7:15 AM, "Paweł Hajdan, Jr."
2 <phajdan.jr@g.o> wrote:
3 > I think we can't salvage much from a corrupted db (anything can happen,
4 > and the reporter mentions some code being present in the files), but at
5 > least "emerge -e world" or equivalent should be possible.
6
7 I'm not sure how portage handles not having ANYTHING in the vdb, but
8 wouldn't it at least be possible to just wipe out the entire directory
9 tree and then do an emerge -e world? As long as the packages
10 themselves are working I would think that this should work.
11
12 The only thing I'm not sure about is that if portage thinks that
13 nothing is installed it might run into circular dependency issues.
14 Maybe we need an option to include dependencies in the list of
15 packages to install but not bail out on circular dependency issues
16 since the reality is that the packages are there. Or, we need to give
17 the user a script to follow (maybe try to follow whatever the logic is
18 in catalyst since obviously that works).
19
20 If the packages themselves are corrupted then installing from binary
21 packages for @system would make sense.
22
23 That thread really sounds like some kind of filesystem corruption
24 issue, even if fsck doesn't report any problems. Something like that
25 happened to me ages ago with some kind of mdadm+lvm+ext3 bug (an fsck
26 on one lvm partition destroyed data on a different partition).
27
28 A more intelligent solution would be to actually check the system for
29 consistency (file hashes, etc), and then just re-emerge the stuff that
30 is broken.
31
32 Rich