Why does btrfs filesystem df return larger number than du?How does BTRFS compare to ZFS?Does Windows have a checksumming filesystem like ZFS or BtrFS?Multi device BTRFS filesystem with disk of different sizeDoes btrfs balance also defragment files?Can I mount a BTRFS snapshot of a live filesystem?BTRFS raid with odd number of devicesDoes btrfs share file parts across snapshots?mv hangs indefinitely on btrfs filesystemKVM/Libvirt/Btrfs Filesystem speed improvementsLinux KVM Client filesystem (BTRFS?)

Is any special diet an effective treatment of autism?

Would a "Permanence" spell in 5e be overpowered?

What was the first story to feature the plot "the monsters were human all along"?

What Kind of Wooden Beam is this

Meaning of the (idiomatic?) expression "seghe mentali"

In linear regression why does regularisation penalise the parameter values as well?

Install Firefox without updates

What to do when scriptures go against conscience?

Is there a proof that the set of real numbers can exactly represent distances?

Gerrymandering Puzzle - Rig the Election

What happens to the electronic movements at absolute 0?

Speed up this NIntegrate

Why did WWI include Japan?

Madam I m Adam..please don’t get mad..you will no longer be prime

Hostile Divisor Numbers

How can a hefty sand storm happen in a thin atmosphere like Martian?

Krull dimension of the ring of global sections

Why didn't this character get a funeral at the end of Avengers: Endgame?

Will a God Eternal enchanted with Deep Freeze shuffle back into the deck if it dies?

All superlinear runtime algorithms are asymptotically equivalent to convex function?

In "Avengers: Endgame", what does this name refer to?

Is there a word for food that's gone 'bad', but is still edible?

How to calculate rate of axial precession?

Why would a military not separate its forces into different branches?



Why does btrfs filesystem df return larger number than du?


How does BTRFS compare to ZFS?Does Windows have a checksumming filesystem like ZFS or BtrFS?Multi device BTRFS filesystem with disk of different sizeDoes btrfs balance also defragment files?Can I mount a BTRFS snapshot of a live filesystem?BTRFS raid with odd number of devicesDoes btrfs share file parts across snapshots?mv hangs indefinitely on btrfs filesystemKVM/Libvirt/Btrfs Filesystem speed improvementsLinux KVM Client filesystem (BTRFS?)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















I have a Linux machine (Ubuntu with Btrfs) which runs Docker and 4 cointainers.



Docker images



# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine 3.8 11cd0b38bc3c 9 months ago 4.41MB
grafana/grafana 5.1.5 6216a7d47b26 10 months ago 238MB
quay.io/prometheus/prometheus v2.3.1 b82ef1f3aa07 10 months ago 119MB


Docker containers



# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e7fdc76b0437 alpine:3.8 "/alertmanager/alert�~@�" 8 days ago Up 12 minutes 0.0.0.0:9093-9094->9093-9094/tcp monitoring_alert_manager_1
732ce2eaace7 grafana/grafana:5.1.5 "/run.sh" 8 days ago Up 12 minutes 0.0.0.0:3000->3000/tcp monitoring_grafana_1
75587d6787e4 quay.io/prometheus/prometheus:v2.3.1 "/bin/prometheus --l�~@�" 8 days ago Up 12 minutes 0.0.0.0:9090->9090/tcp monitoring_prometheus_1
a1d57121c8ce alpine:3.8 "/blackbox_exporter �~@�" 6 months ago Up 12 minutes 0.0.0.0:9115->9115/tcp monitoring_blackbox_exporter_1


Volumes



# du -h -d 1 "/var/lib/docker/volumes/"
451M /var/lib/docker/volumes/monitoring_prometheus
2.3M /var/lib/docker/volumes/monitoring_grafana
4.0K /var/lib/docker/volumes/monitoring_alertmanager
453M /var/lib/docker/volumes/


The problem is that I cannot explain what is using much of the disk space.



# btrfs fi df /
Data, single: total=13.01GiB, used=10.82GiB
System, DUP: total=32.00MiB, used=16.00KiB
Metadata, DUP: total=639.75MiB, used=101.23MiB
GlobalReserve, single: total=16.00MiB, used=0.00B


So, around 11GB is used (also reported by df -h), but I would expect that much less should be used. There are 3 images, which take around 350MB in total and around 450MB is used for actual data, so less than 1GB + OS itself.
If I try to dig where are the files that are taking up disk space - du reports that only 4.8G of the disk is used (ignoring btrfs' copy on write and 2.6G of this is /var/lib/docker).



# du -sh /
du: cannot access '/proc/1209/task/1209/fd/4': No such file or directory
du: cannot access '/proc/1209/task/1209/fdinfo/4': No such file or directory
du: cannot access '/proc/1209/fd/3': No such file or directory
du: cannot access '/proc/1209/fdinfo/3': No such file or directory
4.8G /


I found some hints that this can be in case that some large files are open by application, but deleted. I looked in lsof and rebooted the machine, but the result is the same. Second thing could be subvolumes, but it's apparently the root one that is taking majority of disk space.



# btrfs-du /
Subvolume Total Exclusive ID
var/lib/docker/btrfs/subvolumes/2fddeb2724f7b7ebd816c313e67580b71f36a07386bdb126e3b269cd25d40081 1.20MiB 64.00KiB 259
var/lib/docker/btrfs/subvolumes/5652e05094bbf4b171053cc6be6626d922405f699d79be265f8487b8ce3fd643 3.93MiB 784.00KiB 260
var/lib/docker/btrfs/subvolumes/c9b5313b82c7aa1e562e681e5c3344ac770e2e69820ee6bdbe9b14bf654e472f 71.81MiB 784.00KiB 261
var/lib/docker/btrfs/subvolumes/cf656f2dd19233625e66974ca89fd295583526daf4614e3f738458f629aaf8b6 114.72MiB 784.00KiB 262
var/lib/docker/btrfs/subvolumes/93a4c2f43dc245d01715a9b3c46f268f319e2d6dba2c56a7ad6078c1a98775d9 114.74MiB 784.00KiB 263
var/lib/docker/btrfs/subvolumes/5237ab02149b30f6b45de51cee89a9bec76cdc26b2e40d3cd2e37a88b331fbae 114.76MiB 800.00KiB 264
var/lib/docker/btrfs/subvolumes/6726bf1b2712fb2ed11db8629c339fd0f0afad55a9655a5e3d6ae7ca809e4c62 114.79MiB 800.00KiB 265
var/lib/docker/btrfs/subvolumes/b4eed058bca3d31d9f118b5db82515a3aa6dabcff0fb7d564e2bda1462459ce9 114.79MiB 800.00KiB 266
var/lib/docker/btrfs/subvolumes/76a59d8518448c251436254b0f7c206f65d3ccc56e3e45d1ed571c0d9377618d 114.79MiB 800.00KiB 267
var/lib/docker/btrfs/subvolumes/c740a1bfe14870a61e7fe26da24f0279a1df1d658bcfa4cf537d355f3e7c0c83 57.26MiB 3.64MiB 268
var/lib/docker/btrfs/subvolumes/23c7fccc98ddc4aa5fa1c14f54ae26efcd667e3f7a57fdf4b0870369c85861f4 232.76MiB 3.14MiB 269
var/lib/docker/btrfs/subvolumes/fe33b8bde93cb411035756fa901091261201b86260501035084db889f3e353f4 232.78MiB 3.14MiB 270
var/lib/docker/btrfs/subvolumes/300d2b8c2dfcbbccd09d3cae14d0d80618f5ccd2b53ddacab110057bc4cf9c4f 4.47MiB 160.00KiB 322
var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9-init 4.47MiB 160.00KiB 509
var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9 4.47MiB 160.00KiB 510
var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5-init 114.79MiB 800.00KiB 699
var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5 114.79MiB 800.00KiB 700
var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57-init 232.78MiB 3.14MiB 701
var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57 232.78MiB 3.76MiB 702
var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972-init 4.47MiB 160.00KiB 703
var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972 4.47MiB 160.00KiB 704
Total exclusive data 25.42MiB


Quotas



# btrfs quota rescan /
quota rescan started
# btrfs qgroup show /
qgroupid rfer excl
-------- ---- ----
0/5 10.80GiB 10.80GiB
0/259 1.21MiB 64.00KiB
0/260 3.94MiB 784.00KiB
0/261 71.81MiB 784.00KiB
0/262 114.73MiB 784.00KiB
0/263 114.74MiB 784.00KiB
0/264 114.77MiB 800.00KiB
0/265 114.79MiB 800.00KiB
0/266 114.79MiB 800.00KiB
0/267 114.79MiB 800.00KiB
0/268 57.27MiB 3.64MiB
0/269 232.77MiB 3.14MiB
0/270 232.79MiB 3.14MiB
0/322 4.47MiB 160.00KiB
0/509 4.47MiB 160.00KiB
0/510 4.47MiB 160.00KiB
0/699 114.79MiB 800.00KiB
0/700 114.79MiB 800.00KiB
0/701 232.79MiB 3.14MiB
0/702 232.79MiB 3.77MiB
0/703 4.47MiB 160.00KiB
0/704 4.47MiB 160.00KiB


Does anyone have any clue what is using disk space?










share|improve this question






























    1















    I have a Linux machine (Ubuntu with Btrfs) which runs Docker and 4 cointainers.



    Docker images



    # docker images
    REPOSITORY TAG IMAGE ID CREATED SIZE
    alpine 3.8 11cd0b38bc3c 9 months ago 4.41MB
    grafana/grafana 5.1.5 6216a7d47b26 10 months ago 238MB
    quay.io/prometheus/prometheus v2.3.1 b82ef1f3aa07 10 months ago 119MB


    Docker containers



    # docker ps -a
    CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
    e7fdc76b0437 alpine:3.8 "/alertmanager/alert�~@�" 8 days ago Up 12 minutes 0.0.0.0:9093-9094->9093-9094/tcp monitoring_alert_manager_1
    732ce2eaace7 grafana/grafana:5.1.5 "/run.sh" 8 days ago Up 12 minutes 0.0.0.0:3000->3000/tcp monitoring_grafana_1
    75587d6787e4 quay.io/prometheus/prometheus:v2.3.1 "/bin/prometheus --l�~@�" 8 days ago Up 12 minutes 0.0.0.0:9090->9090/tcp monitoring_prometheus_1
    a1d57121c8ce alpine:3.8 "/blackbox_exporter �~@�" 6 months ago Up 12 minutes 0.0.0.0:9115->9115/tcp monitoring_blackbox_exporter_1


    Volumes



    # du -h -d 1 "/var/lib/docker/volumes/"
    451M /var/lib/docker/volumes/monitoring_prometheus
    2.3M /var/lib/docker/volumes/monitoring_grafana
    4.0K /var/lib/docker/volumes/monitoring_alertmanager
    453M /var/lib/docker/volumes/


    The problem is that I cannot explain what is using much of the disk space.



    # btrfs fi df /
    Data, single: total=13.01GiB, used=10.82GiB
    System, DUP: total=32.00MiB, used=16.00KiB
    Metadata, DUP: total=639.75MiB, used=101.23MiB
    GlobalReserve, single: total=16.00MiB, used=0.00B


    So, around 11GB is used (also reported by df -h), but I would expect that much less should be used. There are 3 images, which take around 350MB in total and around 450MB is used for actual data, so less than 1GB + OS itself.
    If I try to dig where are the files that are taking up disk space - du reports that only 4.8G of the disk is used (ignoring btrfs' copy on write and 2.6G of this is /var/lib/docker).



    # du -sh /
    du: cannot access '/proc/1209/task/1209/fd/4': No such file or directory
    du: cannot access '/proc/1209/task/1209/fdinfo/4': No such file or directory
    du: cannot access '/proc/1209/fd/3': No such file or directory
    du: cannot access '/proc/1209/fdinfo/3': No such file or directory
    4.8G /


    I found some hints that this can be in case that some large files are open by application, but deleted. I looked in lsof and rebooted the machine, but the result is the same. Second thing could be subvolumes, but it's apparently the root one that is taking majority of disk space.



    # btrfs-du /
    Subvolume Total Exclusive ID
    var/lib/docker/btrfs/subvolumes/2fddeb2724f7b7ebd816c313e67580b71f36a07386bdb126e3b269cd25d40081 1.20MiB 64.00KiB 259
    var/lib/docker/btrfs/subvolumes/5652e05094bbf4b171053cc6be6626d922405f699d79be265f8487b8ce3fd643 3.93MiB 784.00KiB 260
    var/lib/docker/btrfs/subvolumes/c9b5313b82c7aa1e562e681e5c3344ac770e2e69820ee6bdbe9b14bf654e472f 71.81MiB 784.00KiB 261
    var/lib/docker/btrfs/subvolumes/cf656f2dd19233625e66974ca89fd295583526daf4614e3f738458f629aaf8b6 114.72MiB 784.00KiB 262
    var/lib/docker/btrfs/subvolumes/93a4c2f43dc245d01715a9b3c46f268f319e2d6dba2c56a7ad6078c1a98775d9 114.74MiB 784.00KiB 263
    var/lib/docker/btrfs/subvolumes/5237ab02149b30f6b45de51cee89a9bec76cdc26b2e40d3cd2e37a88b331fbae 114.76MiB 800.00KiB 264
    var/lib/docker/btrfs/subvolumes/6726bf1b2712fb2ed11db8629c339fd0f0afad55a9655a5e3d6ae7ca809e4c62 114.79MiB 800.00KiB 265
    var/lib/docker/btrfs/subvolumes/b4eed058bca3d31d9f118b5db82515a3aa6dabcff0fb7d564e2bda1462459ce9 114.79MiB 800.00KiB 266
    var/lib/docker/btrfs/subvolumes/76a59d8518448c251436254b0f7c206f65d3ccc56e3e45d1ed571c0d9377618d 114.79MiB 800.00KiB 267
    var/lib/docker/btrfs/subvolumes/c740a1bfe14870a61e7fe26da24f0279a1df1d658bcfa4cf537d355f3e7c0c83 57.26MiB 3.64MiB 268
    var/lib/docker/btrfs/subvolumes/23c7fccc98ddc4aa5fa1c14f54ae26efcd667e3f7a57fdf4b0870369c85861f4 232.76MiB 3.14MiB 269
    var/lib/docker/btrfs/subvolumes/fe33b8bde93cb411035756fa901091261201b86260501035084db889f3e353f4 232.78MiB 3.14MiB 270
    var/lib/docker/btrfs/subvolumes/300d2b8c2dfcbbccd09d3cae14d0d80618f5ccd2b53ddacab110057bc4cf9c4f 4.47MiB 160.00KiB 322
    var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9-init 4.47MiB 160.00KiB 509
    var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9 4.47MiB 160.00KiB 510
    var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5-init 114.79MiB 800.00KiB 699
    var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5 114.79MiB 800.00KiB 700
    var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57-init 232.78MiB 3.14MiB 701
    var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57 232.78MiB 3.76MiB 702
    var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972-init 4.47MiB 160.00KiB 703
    var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972 4.47MiB 160.00KiB 704
    Total exclusive data 25.42MiB


    Quotas



    # btrfs quota rescan /
    quota rescan started
    # btrfs qgroup show /
    qgroupid rfer excl
    -------- ---- ----
    0/5 10.80GiB 10.80GiB
    0/259 1.21MiB 64.00KiB
    0/260 3.94MiB 784.00KiB
    0/261 71.81MiB 784.00KiB
    0/262 114.73MiB 784.00KiB
    0/263 114.74MiB 784.00KiB
    0/264 114.77MiB 800.00KiB
    0/265 114.79MiB 800.00KiB
    0/266 114.79MiB 800.00KiB
    0/267 114.79MiB 800.00KiB
    0/268 57.27MiB 3.64MiB
    0/269 232.77MiB 3.14MiB
    0/270 232.79MiB 3.14MiB
    0/322 4.47MiB 160.00KiB
    0/509 4.47MiB 160.00KiB
    0/510 4.47MiB 160.00KiB
    0/699 114.79MiB 800.00KiB
    0/700 114.79MiB 800.00KiB
    0/701 232.79MiB 3.14MiB
    0/702 232.79MiB 3.77MiB
    0/703 4.47MiB 160.00KiB
    0/704 4.47MiB 160.00KiB


    Does anyone have any clue what is using disk space?










    share|improve this question


























      1












      1








      1








      I have a Linux machine (Ubuntu with Btrfs) which runs Docker and 4 cointainers.



      Docker images



      # docker images
      REPOSITORY TAG IMAGE ID CREATED SIZE
      alpine 3.8 11cd0b38bc3c 9 months ago 4.41MB
      grafana/grafana 5.1.5 6216a7d47b26 10 months ago 238MB
      quay.io/prometheus/prometheus v2.3.1 b82ef1f3aa07 10 months ago 119MB


      Docker containers



      # docker ps -a
      CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
      e7fdc76b0437 alpine:3.8 "/alertmanager/alert�~@�" 8 days ago Up 12 minutes 0.0.0.0:9093-9094->9093-9094/tcp monitoring_alert_manager_1
      732ce2eaace7 grafana/grafana:5.1.5 "/run.sh" 8 days ago Up 12 minutes 0.0.0.0:3000->3000/tcp monitoring_grafana_1
      75587d6787e4 quay.io/prometheus/prometheus:v2.3.1 "/bin/prometheus --l�~@�" 8 days ago Up 12 minutes 0.0.0.0:9090->9090/tcp monitoring_prometheus_1
      a1d57121c8ce alpine:3.8 "/blackbox_exporter �~@�" 6 months ago Up 12 minutes 0.0.0.0:9115->9115/tcp monitoring_blackbox_exporter_1


      Volumes



      # du -h -d 1 "/var/lib/docker/volumes/"
      451M /var/lib/docker/volumes/monitoring_prometheus
      2.3M /var/lib/docker/volumes/monitoring_grafana
      4.0K /var/lib/docker/volumes/monitoring_alertmanager
      453M /var/lib/docker/volumes/


      The problem is that I cannot explain what is using much of the disk space.



      # btrfs fi df /
      Data, single: total=13.01GiB, used=10.82GiB
      System, DUP: total=32.00MiB, used=16.00KiB
      Metadata, DUP: total=639.75MiB, used=101.23MiB
      GlobalReserve, single: total=16.00MiB, used=0.00B


      So, around 11GB is used (also reported by df -h), but I would expect that much less should be used. There are 3 images, which take around 350MB in total and around 450MB is used for actual data, so less than 1GB + OS itself.
      If I try to dig where are the files that are taking up disk space - du reports that only 4.8G of the disk is used (ignoring btrfs' copy on write and 2.6G of this is /var/lib/docker).



      # du -sh /
      du: cannot access '/proc/1209/task/1209/fd/4': No such file or directory
      du: cannot access '/proc/1209/task/1209/fdinfo/4': No such file or directory
      du: cannot access '/proc/1209/fd/3': No such file or directory
      du: cannot access '/proc/1209/fdinfo/3': No such file or directory
      4.8G /


      I found some hints that this can be in case that some large files are open by application, but deleted. I looked in lsof and rebooted the machine, but the result is the same. Second thing could be subvolumes, but it's apparently the root one that is taking majority of disk space.



      # btrfs-du /
      Subvolume Total Exclusive ID
      var/lib/docker/btrfs/subvolumes/2fddeb2724f7b7ebd816c313e67580b71f36a07386bdb126e3b269cd25d40081 1.20MiB 64.00KiB 259
      var/lib/docker/btrfs/subvolumes/5652e05094bbf4b171053cc6be6626d922405f699d79be265f8487b8ce3fd643 3.93MiB 784.00KiB 260
      var/lib/docker/btrfs/subvolumes/c9b5313b82c7aa1e562e681e5c3344ac770e2e69820ee6bdbe9b14bf654e472f 71.81MiB 784.00KiB 261
      var/lib/docker/btrfs/subvolumes/cf656f2dd19233625e66974ca89fd295583526daf4614e3f738458f629aaf8b6 114.72MiB 784.00KiB 262
      var/lib/docker/btrfs/subvolumes/93a4c2f43dc245d01715a9b3c46f268f319e2d6dba2c56a7ad6078c1a98775d9 114.74MiB 784.00KiB 263
      var/lib/docker/btrfs/subvolumes/5237ab02149b30f6b45de51cee89a9bec76cdc26b2e40d3cd2e37a88b331fbae 114.76MiB 800.00KiB 264
      var/lib/docker/btrfs/subvolumes/6726bf1b2712fb2ed11db8629c339fd0f0afad55a9655a5e3d6ae7ca809e4c62 114.79MiB 800.00KiB 265
      var/lib/docker/btrfs/subvolumes/b4eed058bca3d31d9f118b5db82515a3aa6dabcff0fb7d564e2bda1462459ce9 114.79MiB 800.00KiB 266
      var/lib/docker/btrfs/subvolumes/76a59d8518448c251436254b0f7c206f65d3ccc56e3e45d1ed571c0d9377618d 114.79MiB 800.00KiB 267
      var/lib/docker/btrfs/subvolumes/c740a1bfe14870a61e7fe26da24f0279a1df1d658bcfa4cf537d355f3e7c0c83 57.26MiB 3.64MiB 268
      var/lib/docker/btrfs/subvolumes/23c7fccc98ddc4aa5fa1c14f54ae26efcd667e3f7a57fdf4b0870369c85861f4 232.76MiB 3.14MiB 269
      var/lib/docker/btrfs/subvolumes/fe33b8bde93cb411035756fa901091261201b86260501035084db889f3e353f4 232.78MiB 3.14MiB 270
      var/lib/docker/btrfs/subvolumes/300d2b8c2dfcbbccd09d3cae14d0d80618f5ccd2b53ddacab110057bc4cf9c4f 4.47MiB 160.00KiB 322
      var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9-init 4.47MiB 160.00KiB 509
      var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9 4.47MiB 160.00KiB 510
      var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5-init 114.79MiB 800.00KiB 699
      var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5 114.79MiB 800.00KiB 700
      var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57-init 232.78MiB 3.14MiB 701
      var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57 232.78MiB 3.76MiB 702
      var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972-init 4.47MiB 160.00KiB 703
      var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972 4.47MiB 160.00KiB 704
      Total exclusive data 25.42MiB


      Quotas



      # btrfs quota rescan /
      quota rescan started
      # btrfs qgroup show /
      qgroupid rfer excl
      -------- ---- ----
      0/5 10.80GiB 10.80GiB
      0/259 1.21MiB 64.00KiB
      0/260 3.94MiB 784.00KiB
      0/261 71.81MiB 784.00KiB
      0/262 114.73MiB 784.00KiB
      0/263 114.74MiB 784.00KiB
      0/264 114.77MiB 800.00KiB
      0/265 114.79MiB 800.00KiB
      0/266 114.79MiB 800.00KiB
      0/267 114.79MiB 800.00KiB
      0/268 57.27MiB 3.64MiB
      0/269 232.77MiB 3.14MiB
      0/270 232.79MiB 3.14MiB
      0/322 4.47MiB 160.00KiB
      0/509 4.47MiB 160.00KiB
      0/510 4.47MiB 160.00KiB
      0/699 114.79MiB 800.00KiB
      0/700 114.79MiB 800.00KiB
      0/701 232.79MiB 3.14MiB
      0/702 232.79MiB 3.77MiB
      0/703 4.47MiB 160.00KiB
      0/704 4.47MiB 160.00KiB


      Does anyone have any clue what is using disk space?










      share|improve this question
















      I have a Linux machine (Ubuntu with Btrfs) which runs Docker and 4 cointainers.



      Docker images



      # docker images
      REPOSITORY TAG IMAGE ID CREATED SIZE
      alpine 3.8 11cd0b38bc3c 9 months ago 4.41MB
      grafana/grafana 5.1.5 6216a7d47b26 10 months ago 238MB
      quay.io/prometheus/prometheus v2.3.1 b82ef1f3aa07 10 months ago 119MB


      Docker containers



      # docker ps -a
      CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
      e7fdc76b0437 alpine:3.8 "/alertmanager/alert�~@�" 8 days ago Up 12 minutes 0.0.0.0:9093-9094->9093-9094/tcp monitoring_alert_manager_1
      732ce2eaace7 grafana/grafana:5.1.5 "/run.sh" 8 days ago Up 12 minutes 0.0.0.0:3000->3000/tcp monitoring_grafana_1
      75587d6787e4 quay.io/prometheus/prometheus:v2.3.1 "/bin/prometheus --l�~@�" 8 days ago Up 12 minutes 0.0.0.0:9090->9090/tcp monitoring_prometheus_1
      a1d57121c8ce alpine:3.8 "/blackbox_exporter �~@�" 6 months ago Up 12 minutes 0.0.0.0:9115->9115/tcp monitoring_blackbox_exporter_1


      Volumes



      # du -h -d 1 "/var/lib/docker/volumes/"
      451M /var/lib/docker/volumes/monitoring_prometheus
      2.3M /var/lib/docker/volumes/monitoring_grafana
      4.0K /var/lib/docker/volumes/monitoring_alertmanager
      453M /var/lib/docker/volumes/


      The problem is that I cannot explain what is using much of the disk space.



      # btrfs fi df /
      Data, single: total=13.01GiB, used=10.82GiB
      System, DUP: total=32.00MiB, used=16.00KiB
      Metadata, DUP: total=639.75MiB, used=101.23MiB
      GlobalReserve, single: total=16.00MiB, used=0.00B


      So, around 11GB is used (also reported by df -h), but I would expect that much less should be used. There are 3 images, which take around 350MB in total and around 450MB is used for actual data, so less than 1GB + OS itself.
      If I try to dig where are the files that are taking up disk space - du reports that only 4.8G of the disk is used (ignoring btrfs' copy on write and 2.6G of this is /var/lib/docker).



      # du -sh /
      du: cannot access '/proc/1209/task/1209/fd/4': No such file or directory
      du: cannot access '/proc/1209/task/1209/fdinfo/4': No such file or directory
      du: cannot access '/proc/1209/fd/3': No such file or directory
      du: cannot access '/proc/1209/fdinfo/3': No such file or directory
      4.8G /


      I found some hints that this can be in case that some large files are open by application, but deleted. I looked in lsof and rebooted the machine, but the result is the same. Second thing could be subvolumes, but it's apparently the root one that is taking majority of disk space.



      # btrfs-du /
      Subvolume Total Exclusive ID
      var/lib/docker/btrfs/subvolumes/2fddeb2724f7b7ebd816c313e67580b71f36a07386bdb126e3b269cd25d40081 1.20MiB 64.00KiB 259
      var/lib/docker/btrfs/subvolumes/5652e05094bbf4b171053cc6be6626d922405f699d79be265f8487b8ce3fd643 3.93MiB 784.00KiB 260
      var/lib/docker/btrfs/subvolumes/c9b5313b82c7aa1e562e681e5c3344ac770e2e69820ee6bdbe9b14bf654e472f 71.81MiB 784.00KiB 261
      var/lib/docker/btrfs/subvolumes/cf656f2dd19233625e66974ca89fd295583526daf4614e3f738458f629aaf8b6 114.72MiB 784.00KiB 262
      var/lib/docker/btrfs/subvolumes/93a4c2f43dc245d01715a9b3c46f268f319e2d6dba2c56a7ad6078c1a98775d9 114.74MiB 784.00KiB 263
      var/lib/docker/btrfs/subvolumes/5237ab02149b30f6b45de51cee89a9bec76cdc26b2e40d3cd2e37a88b331fbae 114.76MiB 800.00KiB 264
      var/lib/docker/btrfs/subvolumes/6726bf1b2712fb2ed11db8629c339fd0f0afad55a9655a5e3d6ae7ca809e4c62 114.79MiB 800.00KiB 265
      var/lib/docker/btrfs/subvolumes/b4eed058bca3d31d9f118b5db82515a3aa6dabcff0fb7d564e2bda1462459ce9 114.79MiB 800.00KiB 266
      var/lib/docker/btrfs/subvolumes/76a59d8518448c251436254b0f7c206f65d3ccc56e3e45d1ed571c0d9377618d 114.79MiB 800.00KiB 267
      var/lib/docker/btrfs/subvolumes/c740a1bfe14870a61e7fe26da24f0279a1df1d658bcfa4cf537d355f3e7c0c83 57.26MiB 3.64MiB 268
      var/lib/docker/btrfs/subvolumes/23c7fccc98ddc4aa5fa1c14f54ae26efcd667e3f7a57fdf4b0870369c85861f4 232.76MiB 3.14MiB 269
      var/lib/docker/btrfs/subvolumes/fe33b8bde93cb411035756fa901091261201b86260501035084db889f3e353f4 232.78MiB 3.14MiB 270
      var/lib/docker/btrfs/subvolumes/300d2b8c2dfcbbccd09d3cae14d0d80618f5ccd2b53ddacab110057bc4cf9c4f 4.47MiB 160.00KiB 322
      var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9-init 4.47MiB 160.00KiB 509
      var/lib/docker/btrfs/subvolumes/7b5e78985035cc9b7e9c5acdda898cfa661dc0aa85809aa9a2fa437df43a38f9 4.47MiB 160.00KiB 510
      var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5-init 114.79MiB 800.00KiB 699
      var/lib/docker/btrfs/subvolumes/2f34bf0d5958d5d156970742d13859f82ec5990fb4e610e1155b95fb1483f3b5 114.79MiB 800.00KiB 700
      var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57-init 232.78MiB 3.14MiB 701
      var/lib/docker/btrfs/subvolumes/e202293240ca4a4c1f6b996be9ba2d044d4b3007df0c7e5a29a32a949f49ae57 232.78MiB 3.76MiB 702
      var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972-init 4.47MiB 160.00KiB 703
      var/lib/docker/btrfs/subvolumes/ffb1461bb86799876e58e4213483e3da2b1ffee401e975087e296015d6591972 4.47MiB 160.00KiB 704
      Total exclusive data 25.42MiB


      Quotas



      # btrfs quota rescan /
      quota rescan started
      # btrfs qgroup show /
      qgroupid rfer excl
      -------- ---- ----
      0/5 10.80GiB 10.80GiB
      0/259 1.21MiB 64.00KiB
      0/260 3.94MiB 784.00KiB
      0/261 71.81MiB 784.00KiB
      0/262 114.73MiB 784.00KiB
      0/263 114.74MiB 784.00KiB
      0/264 114.77MiB 800.00KiB
      0/265 114.79MiB 800.00KiB
      0/266 114.79MiB 800.00KiB
      0/267 114.79MiB 800.00KiB
      0/268 57.27MiB 3.64MiB
      0/269 232.77MiB 3.14MiB
      0/270 232.79MiB 3.14MiB
      0/322 4.47MiB 160.00KiB
      0/509 4.47MiB 160.00KiB
      0/510 4.47MiB 160.00KiB
      0/699 114.79MiB 800.00KiB
      0/700 114.79MiB 800.00KiB
      0/701 232.79MiB 3.14MiB
      0/702 232.79MiB 3.77MiB
      0/703 4.47MiB 160.00KiB
      0/704 4.47MiB 160.00KiB


      Does anyone have any clue what is using disk space?







      docker btrfs






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 26 at 16:07







      Predkambrij

















      asked Apr 26 at 13:37









      PredkambrijPredkambrij

      3516




      3516




















          0






          active

          oldest

          votes












          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964746%2fwhy-does-btrfs-filesystem-df-return-larger-number-than-du%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964746%2fwhy-does-btrfs-filesystem-df-return-larger-number-than-du%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

          What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

          Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos