There is a file format difference between e2compr-0.3.x and e2compr-0.4.x.
If you are using kernel 2.0, then you are stuck with e2compr-0.3.x (unless you move to kernel 2.2).
If you are an existing e2compr user, you might as well wait a bit before switching to 0.4. In the meantime, I have more chance to smoothen the transition for you (see next section).
Moving from e2compr-0.3 to e2compr-0.4 involves decompressing and/or
removing everything under 0.3, and restoring/recompressing it under
0.4. You must do `chattr -c
' to everything before moving
to 0.4 -- even to directories.
I'm preparing some programs to help people do this. The main thing left
to do is to modify e2compress
to have a mode where
it just looks for problems in files rather than compressing or
decompressing. It is important to find any problems before
archiving and restoring everything, because otherwise the
problems could just get hidden, in which case you'd have
corrupted files without even knowing about it.
For those that wish to perform the transition without waiting, some broad instructions follow. You might like to print off a copy.
find mountpoints -xdev -attr +XED -print0 |
xargs -0 lsattr -d
lsattr
as `*') are being
accessed in raw form. This means that de/compression isn't being done
for them. Run e2decompress
on the file, just
in case someone accidentally wrote to the file in this raw
mode. (The `chattr +X' means of accessing
raw data will be removed from a later version of e2compr.
It really is a broken interface.)
e2decompress
on these
files, take note of any warning message you see, and if
possible check that the file contents are OK.
find
command. If you still have
D files, then worry a little....
This can be done by using the special version of find below, like so:
find mountpoints -xdev \
\( -type f -o -type d \) \
\! -attr '' \
-printf '=%E\0-m\0%M\0-b\0%B\0%p\0' |
gzip -9 > filename.gz
find mountpoints -xdev \
-type f -links 1 -attr +cBEXD -print0 |
xargs -0 e2decompress;
find mountpoints -xdev \
\( -type f -o -type d \) -print0 |
xargs -0 chattr -c
find mountpoints -xdev \
\( -type f -o -type d \) -print0 |
xargs -0 chattr -c
chattr -c -R /
' can use
tar
and its --remove-files
option.
find mountpoints -type d -print0 | \
xargs -0 chattr +c -m method -b clustersize
find mountpoints -type d -print0 | \
xargs -0 chattr -c
xargs -0 -n 6 chattr -V < filename.gz
Here's the find
code:
findutils-e2c_4.1.4-34.4_i386.deb: Debian i386 package (glibc2.1 binaries).
e2cfindutils_4.1.4.orig.tar.gz: source (with changes for e2compr but not Debian).
e2cfindutils_4.1.4-34.4.diff.gz: Debian diffs (from e2cfindutils_4.1.4.orig).
e2cfindutils-4-patch-4.1.gz: e2compr diffs (from standard findutils-4.1). Useful only if you already have the non-e2compr findutils source.
See Installing for instructions
particular to your distribution (including how to use
apt-get
if you use Debian).