Package: coreutils
Version: 8.5-1
Severity: important

Like many systems, my filesystem contains loops due to bind mounts (in my case
it is for scratchbox, the reporter of bug 563254 has a different reason, I
have had other reasons in the past as well).

I use a backup script called dt-s3-backup.sh, which has been working for some
time but has suddenly broken due to the change in du's handling of filesystem
loops. 

Although I exclude the looped files from my backup, the script uses a du 
command which crosses the filesystem loop. Previously, du silently ignored the 
files below the loop -- the script depends on this behaviour and breaks
completely now that du returns an error.

I know about the filesystem loop.  It in no way represents any filesystem
corruption and the change in behaviour should not have been made without some
way to disable it.  I do not object to the new behaviour being the default but
there needs to be an option to disable the error and silently ignore the
loop.

A simple test case to reproduce this problem:

mkdir -p /tmp/du-test/loop
echo hello >/tmp/du-test/a
mount -o bind /tmp /tmp/du-test/loop
du -s /tmp
umount /tmp/du-test/loop

Note: there is no way to avoid this problem using the --exclude option as
excluding the directory does not stop du reporting the error.  This can be seen
by replacing the du command above with:

du --exclude /tmp/du-test/loop -s /tmp

It is possible to use "--exclude=/tmp/du-test" but that excludes too much --
the du command needs to count files such as /tmp/du-test/a.

Note: in this case the script does not specify -x (and it cannot do so).  That
is why I did not add this as additional information to bug #563254.

I believe the change should be backed out for Squeeze as it has the potential 
to break important scripts on any system with filesystem loops.  For the 
subsequent release, a new option can be added to du to ignore loops and the
default behaviour can be changed to report the problem.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: lang=en...@euro, lc_ctype=en...@euro (charmap=ISO-8859-15) (ignored: 
LC_ALL set to en...@euro)
Shell: /bin/sh linked to /bin/bash

Versions of packages coreutils depends on:
ii  libacl1                       2.2.49-3   Access control list shared library
ii  libattr1                      1:2.4.44-2 Extended attribute shared library
ii  libc6                         2.11.2-5   Embedded GNU C Library: Shared lib
ii  libselinux1                   2.0.96-1   SELinux runtime shared libraries

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to