GNU bug report logs - #20578
du counts a multiple times bind-mounted directory just for the first listed directory in a directory lists

Previous Next

Package: coreutils;

Reported by: Toralf Förster <toralf.foerster <at> gmx.de>

Date: Thu, 14 May 2015 18:38:02 UTC

Severity: normal

Tags: notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20578 in the body.
You can then email your comments to 20578 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#20578; Package coreutils. (Thu, 14 May 2015 18:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Toralf Förster <toralf.foerster <at> gmx.de>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 14 May 2015 18:38:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Toralf Förster <toralf.foerster <at> gmx.de>
To: bug-coreutils <at> gnu.org
Subject: du counts a multiple times bind-mounted directory just for the first
 listed directory in a directory lists
Date: Thu, 14 May 2015 20:37:23 +0200
I created few chroot image, each conteaining a Gentoo Linux minimal image.

I do bind-mount a directory from the host (~35 GB of downloaded package files) onto a directory of each of the chroots to save space and bandwith.
A "du -ms" however counts that value just for the first listed directories:

tor-relay /mnt/qa/tinderbox # du -ms amd64-hardened-stable_* amd64-hardened-unstable_* 2>/dev/null
42318   amd64-hardened-stable_20150513-221439
11948   amd64-hardened-unstable_20150513-215830

tor-relay /mnt/qa/tinderbox # du -ms amd64-hardened-unstable_* amd64-hardened-stable_* 2>/dev/null
48790   amd64-hardened-unstable_20150513-215830
5434    amd64-hardened-stable_20150513-221439


Pls Cc:- me - I'm not subscribed


tor-relay /mnt/qa/tinderbox # eix -I sys-apps/coreutils
[I] sys-apps/coreutils
     Available versions:  8.20 8.21 ~8.22 ~8.22-r1 ~8.23 {acl caps gmp multicall nls selinux static vanilla xattr USERLAND="BSD"}
     Installed versions:  8.21(11:34:15 AM 10/25/2014)(acl nls xattr -caps -gmp -selinux -static -vanilla USERLAND="-BSD")
     Homepage:            http://www.gnu.org/software/coreutils/
     Description:         Standard GNU file utilities (chmod, cp, dd, dir, ls...), text utilities (sort, tr, head, wc..), and shell utilities (whoami, who,...)


-- 
Toralf
pgp key: 7B1A 07F4 EC82 0F90 D4C2  8936 872A E508 0076 E94E
--
"; the past is all dirty and cruel in the modern popular imagination, with the exception of the Romans, who are just cruel"
Ian Mortimer, 2008, "The Time Traveller's Guide to Medieval England"




Information forwarded to bug-coreutils <at> gnu.org:
bug#20578; Package coreutils. (Fri, 15 May 2015 02:36:02 GMT) Full text and rfc822 format available.

Message #8 received at 20578 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Toralf Förster <toralf.foerster <at> gmx.de>, 
 20578 <at> debbugs.gnu.org
Subject: Re: bug#20578: du counts a multiple times bind-mounted directory
 just for the first listed directory in a directory lists
Date: Thu, 14 May 2015 19:35:36 -0700
Toralf Förster wrote:
> I do bind-mount a directory from the host (~35 GB of downloaded package files) onto a directory of each of the chroots to save space and bandwith.
> A "du -ms" however counts that value just for the first listed directories

It sounds like 'du' is doing the right thing.  du is supposed to count disk 
usage, which means it's not supposed to double-count files.

If you prefer each directory to be considered independently, you can use 'du a; 
du b' rather than 'du a b'.  Or possibly you may want the --count-links or 
--apparent-size options.




Information forwarded to bug-coreutils <at> gnu.org:
bug#20578; Package coreutils. (Tue, 23 Oct 2018 02:21:02 GMT) Full text and rfc822 format available.

Message #11 received at 20578 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: 20578 <at> debbugs.gnu.org
Subject: Re: bug#20578: du counts a multiple times bind-mounted directory just
 for the first listed directory in a directory lists
Date: Mon, 22 Oct 2018 20:20:19 -0600
tags 20578 notabug
close 20578
stop

(triaging old bugs)

On 14/05/15 08:35 PM, Paul Eggert wrote:
> Toralf Förster wrote:
>> I do bind-mount a directory from the host (~35 GB of downloaded 
>> package files) onto a directory of each of the chroots to save space 
>> and bandwith.
>> A "du -ms" however counts that value just for the first listed 
>> directories
> 
> It sounds like 'du' is doing the right thing.  du is supposed to count 
> disk usage, which means it's not supposed to double-count files.

With no further comments in 3 years, I'm closing this bug.
Discussion can continue by replying to this thread.

-assaf




Added tag(s) notabug. Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 02:21:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 20578 <at> debbugs.gnu.org and Toralf Förster <toralf.foerster <at> gmx.de> Request was from Assaf Gordon <assafgordon <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 23 Oct 2018 02:21:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Nov 2018 12:24:09 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 292 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.