Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Values calculated are incorrect - ca. 10x smaller #10

Closed
madmanxxx opened this issue Dec 25, 2017 · 3 comments
Closed

Values calculated are incorrect - ca. 10x smaller #10

madmanxxx opened this issue Dec 25, 2017 · 3 comments

Comments

@madmanxxx
Copy link

I have a freshly created BTRFS file system with only one file. It is ca. 68GB in size when compressed:

[root@nas ~]# df -h /dev/sdc1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc1       932G   68G  863G   8% /mnt/m3

The uncompressed file is 257GB:

[root@nas ~]# du -h /mnt/m3/rav.img
257G    /mnt/m3/rav.img
[root@nas ~]# ls -lh /mnt/m3
total 257G
-rw-r--r-- 1 root root 257G 12-25 17:02 rav.img

But when I use compsize, I get the following result:

[root@nas compsize]$ ./compsize /mnt/m3/rav.img
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL       40%       10G          26G          26G
none       100%      3.0G         3.0G         3.0G
zstd        32%      7.6G          23G          23G

Environment:

  • Arch Linux, kernel: 4.14.8-1-ARCH
  • btrfs-progs: 4.14-2
  • compsize: 33c07cb
@roiderats
Copy link

I was almost sure about wrong reporting with my 240 and 120 GB disk-image files, reported so small(like 9GB if I remember correctly) that maybe there's bytes worth of highest bits lost somewhere. Can't get into studying that now thou.

@kilobyte
Copy link
Owner

@roiderats: is this with or without the fix I applied two weeks ago?

The value of 24GB shows only on fully compressed, unfragmented files — having any non-compressed extents (the original reporter had 3G of them) moves the max up, fragmentation moves it down.

@roiderats
Copy link

My observation was atleast two weeks ago. Status closed=fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants