Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Liu Bo <bo.li.liu@oracle.com>
To: Russell Coker <russell@coker.com.au>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: du accuracy
Date: Fri, 10 Apr 2015 18:40:15 +0800	[thread overview]
Message-ID: <20150410104015.GB10185@localhost.localdomain> (raw)
In-Reply-To: <201504101125.58088.russell@coker.com.au>

On Fri, Apr 10, 2015 at 11:25:57AM +1000, Russell Coker wrote:
> I'm copying an image of a 2G microSD card to a BTRFS filesystem.  The SD card 
> is from an Android phone and is almost full of Android packages and photos, 
> there's very little space on the filesystem and what space there is probably 
> isn't filled with zeros.
> 
> # ls -l
> total 888000
> -rw-r--r--. 1 root root 1043529728 Apr 10 11:20 2gsd
> 
> While doing it I run ls commands to see the progress and get output like the 
> above.  Why is the file size according to ls not matching the total used?
> 
> # du -h
> 886M    .
> 
> When I ran du immediately afterwards it also reported that there was less than 
> 1G used.
> 
> # du -h
> 1.2G    .
> # du -h
> 1.2G    .
> # du -h
> 1.1G    .
> # du -h
> 1.1G    .
> # du -h
> 1.1G    .
> # du -h
> 1.2G    .
> # du -h
> 1.2G    .
> 
> Above are some consecutive du runs.  Why does the space used go from 1.2G to 
> 1.1G before going up again?  The file was created by "cat /dev/sde > 2gsd" so 
> it definitely wasn't getting smaller.
> 
> What's going on here?

What's your mount options?  with autodefrag or compression?

Thanks,

-liubo
> 
> -- 
> My Main Blog         http://etbe.coker.com.au/
> My Documents Blog    http://doc.coker.com.au/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-04-10 10:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-10  1:25 du accuracy Russell Coker
2015-04-10 10:40 ` Liu Bo [this message]
2015-04-12 11:12   ` Russell Coker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150410104015.GB10185@localhost.localdomain \
    --to=bo.li.liu@oracle.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=russell@coker.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox