Tue, 22 Aug 2006

XFS nightmares

Following up to madduck's and gwolf's recent horror stories on XFS, last Thursday, my desktop greeted me after the fantastic week around Asturies with a series of I/O errors whenever I tried to execute something. I rebooted, and then the kernel wasn't happy.

I/O error in filesystem ("hda1") meta-data dev hda1 block 0x4a9778  ("xlog_iodone") error 5 buf count 1024

/dev/hda1 is my / partition, and the machine would not boot at all. To make things more interesting, the box refused to boot from any of my old CD and DVD drives.

Yesterday, with my mail piling up already at Sindominio's mailserver, I managed to find a spare CD writer, which would not open its tray, and a DVD reader which managed to boot a Breezy Live CD I had around.

The good guys at #xfs were helpful as always and helped me in the process of not fucking up my valuable root filesystem while trying to fix it. The filesystem ended up having quite some corruption here and there, but after xfs_repair, nubol was able to boot again. Only it was missing libldap.so.2, libX11.so.6, debconf programs and other minor details like those. Some reinstall rounds later, GNOME was able to startup without errors and now the box is up and running.

Does anyone know of some script that compares dpkg's contents database with that the filesystem has, so I can easily find the rest of damaged packages to reinstall them?

try 'cruft' to find any lost (or extra) files

Posted by rab at Tue Aug 22 11:47:39 2006

I'm not 100% sure but I guess debsums might be helpful as well, i.e. comparing MD5 checksums of installed packages with the filesystem.

Posted by Carsten at Tue Aug 22 12:00:18 2006

I thought cruft wasn't maintained anymore.
There's debsums, though.

Posted by Jordi at Tue Aug 22 12:10:44 2006

I have written up a page that outlines the steps I used in a similar situation:
http://ch.tudelft.nl/~arthur/recovery.html

Posted by Arthur de Jong at Tue Aug 22 15:27:36 2006

not sure this is exactly what you mean but.. I had some disk curruption recently (and in the past) and wanted to see what needed to be reinstalled:
----------------------------
B=missing.files
C=broken.symlinks
touch $B
touch $C
rm $B
rm $C
dpkg --get-selections|grep install|grep -v deinstall|awk '{print $1}'| while read line; do
  cat /var/lib/dpkg/info/$line.list| while read line2; do
  if [ ! -e "$line2" ]; then
  if [ ! -h "$line2" ]; then
  echo $line:$line2 >> $B;
  else
  echo $line:$line2 >> $C;
  fi
  fi
  done
done

Posted by Kevin Mark at Wed Aug 23 02:53:29 2006

I'm not sure it's entirely possible.  Many packages generate files on install.  (For example, byte-compiling some source files in certain languages.)  I didn't think the .deb contained a list of all files that end up on disk because of its installation, only those that exist in its archive.

Posted by Ken at Wed Aug 23 18:42:52 2006

It is a dell ?

Posted by asyd at Fri Aug 25 15:14:33 2006

It is a dell ?

Posted by asyd at Fri Aug 25 15:14:34 2006