Comment 48 for bug 870326

Revision history for this message
Chris Moore (dooglus) wrote :

I think this bug is causing data corruption.

I was in the process of moving my files off the encrypted partition to an unencrypted partition:

chris@chris:~$ sudo mv dotfiles /home/chris2/
[sudo] password for chris:
mv: cannot open `dotfiles/.du.txt.swp' for reading: Input/output error
mv: cannot open `dotfiles/.du.txt.swx' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.8SWB6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.YSGG6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.R2UH6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.TEQG6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.XJ1D6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.PASY5U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.HNKY5U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.6VJI6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.IWN95U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.N8IH6U' for reading: Input/output error
mv: cannot open `dotfiles/.gnome2/nautilus-sendto/pidgin_buddies_online.RPZ15U' for reading: Input/output error
mv: cannot open `dotfiles/.recently-used.xbel.MC8H6U' for reading: Input/output error
chris@chris:~$

the errors are all about zero-length files that it can't read. Because of the errors, the original folder wasn't deleted. I then ran a 'diff -r' and found that in addition to the zero-length files that didn't get copied, some files with real content were copied wrongly. Over 15,000 files were copied. Only 6 were copied incorrectly, and they were all in the same folder. All 6 files in that folder were copied incorrectly:

chris@chris:~/dotfiles/.keychain$ ls -l /home/chris/dotfiles/.keychain
total 48
-rw------- 1 chris chris 80 2010-09-02 18:32 chris-laptop-csh
-rw------- 1 chris chris 58 2010-09-02 18:32 chris-laptop-csh-gpg
-rw------- 1 chris chris 136 2010-09-02 18:32 chris-laptop-fish
-rw------- 1 chris chris 87 2010-09-02 18:32 chris-laptop-fish-gpg
-rw------- 1 chris chris 110 2010-09-02 18:32 chris-laptop-sh
-rw------- 1 chris chris 74 2010-09-02 18:32 chris-laptop-sh-gpg
chris@chris:~/dotfiles/.keychain$ ls -l /home/chris2/dotfiles/.keychain
total 24
-rw------- 1 chris chris 80 2010-09-02 18:32 chris-laptop-csh
-rw------- 1 chris chris 58 2010-09-02 18:32 chris-laptop-csh-gpg
-rw------- 1 chris chris 136 2010-09-02 18:32 chris-laptop-fish
-rw------- 1 chris chris 87 2010-09-02 18:32 chris-laptop-fish-gpg
-rw------- 1 chris chris 110 2010-09-02 18:32 chris-laptop-sh
-rw------- 1 chris chris 74 2010-09-02 18:32 chris-laptop-sh-gpg
chris@chris:~/dotfiles/.keychain$ for i in *; do cmp /home/chris{,2}/dotfiles/.keychain/$i; done
/home/chris/dotfiles/.keychain/chris-laptop-csh /home/chris2/dotfiles/.keychain/chris-laptop-csh differ: byte 49, line 2
/home/chris/dotfiles/.keychain/chris-laptop-csh-gpg /home/chris2/dotfiles/.keychain/chris-laptop-csh-gpg differ: byte 49, line 1
/home/chris/dotfiles/.keychain/chris-laptop-fish /home/chris2/dotfiles/.keychain/chris-laptop-fish differ: byte 1, line 1
/home/chris/dotfiles/.keychain/chris-laptop-fish-gpg /home/chris2/dotfiles/.keychain/chris-laptop-fish-gpg differ: byte 49, line 1
/home/chris/dotfiles/.keychain/chris-laptop-sh /home/chris2/dotfiles/.keychain/chris-laptop-sh differ: byte 33, line 1
/home/chris/dotfiles/.keychain/chris-laptop-sh-gpg /home/chris2/dotfiles/.keychain/chris-laptop-sh-gpg differ: byte 49, line 1
chris@chris:~/dotfiles/.keychain$

kern.log has lots of errors in it like this:

Oct 20 11:58:51 chris kernel: [ 7803.424618] Valid eCryptfs headers not found in file header region or xattr region
Oct 20 11:58:51 chris kernel: [ 7803.424622] Either the lower file is not in a valid eCryptfs format, or the key could not be retrieved. Plaintext passthrough mode is not enabled; returning -EIO

What is the best way of preventing further data loss?