Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Sep 2014 11:17:33 -0600
From:      Ian Lepore <ian@FreeBSD.org>
To:        Erich Dollansky <erichsfreebsdlist@alogt.com>
Cc:        "freebsd-stable@freebsd.org" <freebsd-stable@freebsd.org>
Subject:   Re: du: strange behaviour
Message-ID:  <1409591853.1150.206.camel@revolution.hippie.lan>
In-Reply-To: <20140902010816.49a656ee@X220.alogt.com>
References:  <20140901235750.220be58e@X220.alogt.com> <CA%2BtpaK0uCjOS09unM25ZJMT-3wLfZKOC5wsFLzVxWx-fmui06w@mail.gmail.com> <20140902010816.49a656ee@X220.alogt.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2014-09-02 at 01:08 +0800, Erich Dollansky wrote:
> Hi,
> 
> On Mon, 1 Sep 2014 11:25:15 -0500
> Adam Vande More <amvandemore@gmail.com> wrote:
> 
> > On Mon, Sep 1, 2014 at 10:57 AM, Erich Dollansky <
> > erichsfreebsdlist@alogt.com> wrote:
> > 
> > > Hi,
> > >
> > > I just try to get a Raspberry Pi up and running. I use a FreeBSD
> > > installation to do this:
> > >
> > > FreeBSD X220.alogt.com 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #44
> > > r270870: Mon Sep  1 08:46:27 WITA 2014
> > > erich@X220.alogt.com:/usr/obj/usr/src/sys/X220  amd64
> > >
> > > For some reason I did
> > >
> > > [X220]/rescue (root) > du *
> > > 6.6M    [
> > >  12K    dhclient-script
> > > 4.0K    nextboot
> > > 6.6M    total
> > > [X220]/rescue (root) >
> > >
> > > A plain du gives this:
> > >
> > > [X220]/rescue (root) > du
> > > 6.6M    .
> > > 6.6M    total
> > > [X220]/rescue (root) >
> > >
> > > If I do the same inside the directory containing /rescue for the
> > > Raspberry, I get a list ending with these lines:
> > >
> > > 5.7M    unxz
> > > 5.7M    vi
> > > 5.7M    whoami
> > > 5.7M    xz
> > > 5.7M    xzcat
> > > 5.7M    zcat
> > > 5.7M    zfs
> > > 5.7M    zpool
> > > 768M    total
> > >
> > > This is what I also would have expected for the amd64 directory.
> > >
> > > Why does du stop after [ but includes the two scripts?
> > >
> > > Of course, all the other files are also in this directory as shown
> > > by ll:
> > >
> > > total 931792
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 [
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 atmconfig
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 badsect
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 bsdlabel
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 bunzip2
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 bzcat
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 bzip2
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 camcontrol
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 cat
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 ccdconfig
> > > -r-xr-xr-x  138 root  wheel   6.5M Sep  1 09:16 chflags
> > >
> > > ...
> > >
> > > Does somebody have any ideas?
> > >
> > 
> > man du | grep '\-l'
> > du -l *
> > 
> I do not really get this. The other files are there but not seen
> because of hard links in /rescue?
> 
> Why is this then different on /rescue for ARM?
> 

I get exactly the same results for "du *" in /rescue on x86 and armv6.
I speculate that whatever mechanism you used to populate your root
filesystem on the arm broke the hardlinks and created many identical
files with different names in that directory.  "ls -i" could confirm
that.

-- Ian





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1409591853.1150.206.camel>