I have a little situation here... My raid failed and I lost the /var directory , among others.. I managed to make the system start again , but I need to update it (the / and /boot partitions were raid 1 , but they werent in sync , dont ask me why..) , because the latest kernel I have is 2149... but I can update , because the rpm db is gone.. I cant rebuild the rpmdb , because it tries to use /var/lib/rpm/Packages , which is gone also... Any ideas on how to rebuild the db? (I cant reinstall the system now.. lots of things depend on this machine and I need to do some things before reinstalling it)
-- Pedro Macedo
Pedro Fernandes Macedo wrote:
I have a little situation here... My raid failed and I lost the /var directory , among others.. I managed to make the system start again , but I need to update it (the / and /boot partitions were raid 1 , but they werent in sync , dont ask me why..) , because the latest kernel I have is 2149... but I can update , because the rpm db is gone.. I cant rebuild the rpmdb , because it tries to use /var/lib/rpm/Packages , which is gone also... Any ideas on how to rebuild the db? (I cant reinstall the system now.. lots of things depend on this machine and I need to do some things before reinstalling it)
/var/lib/rpm/Packages is installed as part of the 'rpm' rpm. If you grab the .src.rpm you should be able to extract the file and re-install it manually. It also -might- work to run "rpm -i --force rpm-*.rpm".
If the db is completely gone, you'll probably need to start by creating one: "rpm --initdb". At that point you might be able to re-install your rpms with "--justdb" (if all their pieces are still in place) or "--force" (if you want the files physically reinstalled).
I've never had to try to rebuild /var from scratch, so I can't really say what will and won't work.
On Mar 4, 2004, at 2:16 PM, Pedro Fernandes Macedo wrote:
I have a little situation here... My raid failed and I lost the /var directory , among others.. I managed to make the system start again , but I need to update it (the / and /boot partitions were raid 1 , but they werent in sync , dont ask me why..) , because the latest kernel I have is 2149... but I can update , because the rpm db is gone.. I cant rebuild the rpmdb , because it tries to use /var/lib/rpm/Packages , which is gone also... Any ideas on how to rebuild the db? (I cant reinstall the system now.. lots of things depend on this machine and I need to do some things before reinstalling it)
Just restore from your backups, then rpm --rebuilddb.
-- Jason Dixon, RHCE DixonGroup Consulting http://www.dixongroup.net
Jason Dixon wrote:
Just restore from your backups, then rpm --rebuilddb.
Sadly this was our backup server , and we never made a backup of it ... just from the other machines... I found out that I've lost the index files for the amanda backups I had , so I can simply reinstall my server now... The odd thing: it was installed on a set of raid 1 partitions... /boot and / were different on each disk ( /boot had the old 2149 kernel on one disk and the other had only 2166 and 2174 kernels..) I wish I knew why this difference , as raid 1 is supposed to be mirroring...
But thanks for the help guys..
-- Pedro Macedo
Pedro Fernandes Macedo wrote:
Jason Dixon wrote:
Just restore from your backups, then rpm --rebuilddb.
Sadly this was our backup server , and we never made a backup of it ... just from the other machines... I found out that I've lost the index files for the amanda backups I had , so I can simply reinstall my server now... The odd thing: it was installed on a set of raid 1 partitions... /boot and / were different on each disk ( /boot had the old 2149 kernel on one disk and the other had only 2166 and 2174 kernels..) I wish I knew why this difference , as raid 1 is supposed to be mirroring...
It sounds like the mirror got broken at some point, perhaps when a disk error was detected (yielding seven kernel versions of bad luck).
If you don't watch the logs closely, it can be disturbingly easy to miss RAID-related messages for things like 'I failed this drive today'.
Bevan C. Bennett wrote:
It sounds like the mirror got broken at some point, perhaps when a disk error was detected (yielding seven kernel versions of bad luck).
If you don't watch the logs closely, it can be disturbingly easy to miss RAID-related messages for things like 'I failed this drive today'.
Looks like my co-worker didnt see this e-mail then... He receives all the e-mails to root for our domain (about 100 linux boxes , and about 50 sun) and he usually doesnt have the time to read them all.. I only saw the failed raid when I changed the mail config on our mailqueue/backup server to ensure that our migration to postfix was working perfectly... I guess we need to change the default policy for root e-mails...
-- Pedro Macedo