linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][BTRFS-PROGS][V1] btrfs filesystem df
@ 2012-10-03 11:43 Goffredo Baroncelli
  2012-10-03 11:43 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
                   ` (3 more replies)
  0 siblings, 4 replies; 23+ messages in thread
From: Goffredo Baroncelli @ 2012-10-03 11:43 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-btrfs@vger.kernel.org, Goffredo Baroncelli

This serie of patches updated the command "btrfs filesystem
df". I update this command because it is not so easy to get
the information about the disk usage from the command "fi df" and "fi show".

>From the man page (see 2nd patch):

[...]
The  command  btrfs  filesystem  df is used to query the
status of the chunks, how many space on the disk(s) are used  by
the  chunks,  how many space are available in the chunks, and an
estimation of the free space of the filesystem.
[...]

$ ./btrfs filesystem df --help
usage: btrfs filesystem disk-usage [-d][-s][-k] <path> [<path>..]

    Show space usage information for a mount point(s).

    -k  Set KB (1024 bytes) as unit
    -s  Don't show the summary section
    -d  Don't show the detail section

$ ./btrfs filesystem df /
Path: /
Summary:
  Disk_size:                 72.57GB
  Disk_allocated:            25.10GB
  Disk_unallocated:          47.48GB
  Logical_size:              23.06GB
  Used:                      11.01GB
  Free_(Estimated):          55.66GB    (Max: 59.52GB, Min: 35.78GB)
  Data_to_disk_ratio:           92 %

Details:
  Chunk-type  Mode      Chunk-size Logical-size        Used
  Data        Single       21.01GB      21.01GB     10.34GB
  System      DUP          80.00MB      40.00MB      4.00KB
  System      Single        4.00MB       4.00MB        0.00
  Metadata    DUP           4.00GB       2.00GB    686.93MB
  Metadata    Single        8.00MB       8.00MB        0.00

Where:
        Disk_size                       -> sum of sizes of teh disks
        Disk_allocated                  -> sum of chunk sizes
        Disk_unallocated                -> Disk_size - Disk_allocated
        Logical_size                    -> sum of logical area sizes
        Used                            -> logical area used
        Free_(Estimated)                -> on the basis of allocated
                                           chunk, an estrapolation of
                                           the free space
        Data_to_disk_ratio              -> ration between the space occuped
                                           by a chunk and the real space
                                           available ( due to duplication
                                           and/or RAID level)
        Chunk-type                      -> kind of chunk
        Mode                            -> allocation policy of a chunk
        Chunk-size                      -> area of disk(s) occuped by the
                                           chunk (see it as raw space used)
        Logical-size                    -> logical area size of the chunk
        Used                            -> portion of the logical area
                                           used by the filesystem



You can pull this change from
   http://cassiopea.homelinux.net/git/btrfs-progs-unstable.git
branch
   disk_free

Comments are welcome.

BR
Goffredo Baroncelli

Changelog:
V0->V1          Change the name of command from disk-usage to df

Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-10-12 10:01 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 11:43 [PATCH][BTRFS-PROGS][V1] btrfs filesystem df Goffredo Baroncelli
2012-10-03 11:43 ` [PATCH 1/2] Update btrfs filesystem df command Goffredo Baroncelli
2012-10-03 15:02   ` Ilya Dryomov
2012-10-03 16:34     ` Goffredo Baroncelli
2012-10-03 17:20       ` Ilya Dryomov
2012-10-03 17:38         ` Goffredo Baroncelli
2012-10-03 17:09     ` Goffredo Baroncelli
2012-10-03 11:43 ` [PATCH 2/2] Update help page Goffredo Baroncelli
2012-10-03 11:56 ` [PATCH][BTRFS-PROGS][V1] btrfs filesystem df Hugo Mills
2012-10-03 16:17   ` Goffredo Baroncelli
2012-10-03 16:34     ` Hugo Mills
2012-10-09  9:43   ` Bart Noordervliet
2012-10-09 11:38     ` Goffredo Baroncelli
2012-10-09 12:51       ` Bart Noordervliet
2012-10-09 18:22         ` Goffredo Baroncelli
2012-10-12  9:42           ` Martin Steigerwald
2012-10-03 15:01 ` Ilya Dryomov
2012-10-03 16:46   ` Goffredo Baroncelli
2012-10-03 17:46     ` Ilya Dryomov
2012-10-03 20:01       ` Goffredo Baroncelli
2012-10-03 20:24         ` Ilya Dryomov
2012-10-12 10:01       ` Martin Steigerwald
2012-10-12  9:55   ` Martin Steigerwald

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).