From patchwork Thu Feb 13 19:19:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 3647331 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE54CBF13A for ; Thu, 13 Feb 2014 19:19:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA31C201B4 for ; Thu, 13 Feb 2014 19:19:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CD92A2011B for ; Thu, 13 Feb 2014 19:19:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751692AbaBMTTG (ORCPT ); Thu, 13 Feb 2014 14:19:06 -0500 Received: from outrelay07.libero.it ([212.52.84.111]:44910 "EHLO outrelay07.libero.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbaBMTTF (ORCPT ); Thu, 13 Feb 2014 14:19:05 -0500 X-CTCH-Spam: Unknown X-CTCH-RefID: str=0001.0A0C0207.52FD1AA8.013A,ss=1,re=0.000,fgs=0 X-libjamoibt: 1823 Received: from venice.bhome (151.28.65.181) by outrelay07.libero.it (8.6.033) (authenticated as kreijack@libero.it) id 52EA696D03090162 for linux-btrfs@vger.kernel.org; Thu, 13 Feb 2014 20:19:04 +0100 Message-ID: <52FD1AAD.90407@libero.it> Date: Thu, 13 Feb 2014 20:19:09 +0100 From: Goffredo Baroncelli Reply-To: kreijack@inwind.it User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: linux-btrfs@vger.kernel.org Subject: [PATCH 2/8] Create the man page entry for the command btrfs fi df References: <1392318441-9224-1-git-send-email-kreijack@libero.it> In-Reply-To: <1392318441-9224-1-git-send-email-kreijack@libero.it> X-Enigmail-Version: 1.6 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Goffredo Baroncelli --- man/btrfs.8.in | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index b620348..4acf16d 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -35,6 +35,9 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBfilesystem label\fP [\fI\fP|\fI\fP] [\fI\fP] .PP +\fBbtrfs\fP \fBfilesystem df\fP\fI [-b] \fIpath [path..]\fR\fP +.PP +\fBbtrfs\fP \fBfilesystem balance\fP\fI \fP .PP \fBbtrfs\fP \fB[filesystem] balance start\fP [\fIoptions\fP] \fI\fP .PP @@ -370,6 +373,55 @@ force reducing of metadata integrity \fB[filesystem] balance pause\fR\fI \fR Pause running balance. + +.RE +.TP + +\fBfilesystem df\fP [-b] \fIpath [path..]\fR + +Show space usage information for a mount point. + +\fB-b\fP Set byte as unit + +The command \fBbtrfs filesystem df\fP is used to query how many space on the +disk(s) are used and an estimation of the free +space of the filesystem. +The output of the command \fBbtrfs filesystem df\fP shows: + +.RS +.IP \fBDisk\ size\fP +the total size of the disks which compose the filesystem. + +.IP \fBDisk\ allocated\fP +the size of the area of the disks used by the chunks. + +.IP \fBDisk\ unallocated\fP +the size of the area of the disks which is free (i.e. +the differences of the values above). + +.IP \fBUsed\fP +the portion of the logical space used by the file and metadata. + +.IP \fBFree\ (estimated)\fP +the estimated free space available: i.e. how many space can be used +by the user. The evaluation +cannot be rigorous because it depends by the allocation policy (DUP, Single, +RAID1...) of the metadata and data chunks. If every chunk is stored as +"Single" the sum of the \fBfree (estimated)\fP space and the \fBused\fP +space is equal to the \fBdisk size\fP. +Otherwise if all the chunk are mirrored (raid1 or raid10) or duplicated +the sum of the \fBfree (estimated)\fP space and the \fBused\fP space is +half of the \fBdisk size\fP. Normally the \fBfree (estimated)\fP is between +these two limits. + +.IP \fBData\ to\ disk\ ratio\fP +the ratio betwen the \fBlogical size\fP (i.e. the space available by +the chunks) and the \fBdisk allocated\fP (by the chunks). Normally it is +lower than 100% because the metadata is duplicated for security reasons. +If all the data and metadata are duplicated (or have a profile like RAID1) +the \fBData\ to\ disk\ ratio\fP could be 50%. + +.RE .TP \fB[filesystem] balance cancel\fR\fI \fR