From patchwork Sat Feb 23 13:46:06 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 2178421 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D9EC840DCC for ; Sat, 23 Feb 2013 13:45:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759147Ab3BWNpf (ORCPT ); Sat, 23 Feb 2013 08:45:35 -0500 Received: from nm12.bullet.mail.ird.yahoo.com ([77.238.189.65]:38352 "HELO nm12.bullet.mail.ird.yahoo.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1759075Ab3BWNpQ (ORCPT ); Sat, 23 Feb 2013 08:45:16 -0500 Received: from [77.238.189.54] by nm12.bullet.mail.ird.yahoo.com with NNFMP; 23 Feb 2013 13:45:14 -0000 Received: from [46.228.39.99] by tm7.bullet.mail.ird.yahoo.com with NNFMP; 23 Feb 2013 13:45:14 -0000 Received: from [127.0.0.1] by smtp136.mail.ir2.yahoo.com with NNFMP; 23 Feb 2013 13:45:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1361627114; bh=XwRgwppe7ESeH7WMz8gLJXVDgeyq8ZxcYPtL9/xEYr0=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer:In-Reply-To:References; b=pEw6HoEhzyxKUvr1SUlmu30qEnPzXrrR1VudHgmxIejAHojAbs6xi3D89a3REZLYz2U3FQx13VP4kKyv14LaGKGDVfrse/MXcVrPUsWJlmDJxpCNO4UhBbVT1H6o1dvyKupI7koWRA0AQ9+wjN2B+10c18A2k9Sa9l3EXzdmU9M= X-Yahoo-Newman-Id: 742903.89777.bm@smtp136.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: jNHDREUVM1lro30_8wDLEc9I3w9XLY7QPKPrOA4MZrLvbUy 7XzxgtXdJ8arDva55lHokff8NG_ycKgDPJNAuIwDgzJfM73G3AP02R7EUgAB CqGKGXjychjuaPFfZ3tQW8TTi2L2lijAJUa8xC8YmJs6NbVrQmKaMs7gR8yq c._m8csKFXlWSfUeUrfuEoukmHLc7qP3r0uQRNJfzzbH9jxO8Gt7DxkEbKLi dWlZ0eX.jc04nPilLS1aimUUrp2Wsms8uY5a1OCyMAsKH.wDCli9Djy7jOLK rCexpWLtsQDr3XIapWysq.Mt1EveoAMtg2.Uiwhf4Q4d.md9ZbXlWs6b07Hn O50JFU9NZNxUiT7Qb_Fg4tWQEuF2S3Nt1qnMxOdQlhbcSLPQ8BMwCYGrRtJz a5n9WK6gHSQ_JwUV31E4s.I2D7XNBqDoO.NGnMHBXS8f8e0VNRCmZxqq2M0j lfreXkKsTRXy5WP5c_d8F_8LKGWWblEED2ZFv5BzbZ9YlIkgzX__mIWzxjUR fzcEvKgg- X-Yahoo-SMTP: ssXiUn.swBDBJsD4bjmtGfj6buOv3E4378JD.MOD2Xo- Received: from venice..bhome (goffredo.baroncelli@95.242.133.103 with login) by smtp136.mail.ir2.yahoo.com with SMTP; 23 Feb 2013 13:45:14 +0000 UTC From: Goffredo Baroncelli To: linux-btrfs@vger.kernel.org Cc: Hugo Mills , Michael =?utf-8?q?Kj=C3=B6rling?= , Martin Steigerwald , cwillu , Chris Murphy , David Sterba , Zach Brown , Goffredo Baroncelli Subject: [PATCH 3/8] Create the man page entry for the command btrfs fi df Date: Sat, 23 Feb 2013 14:46:06 +0100 Message-Id: <1361627171-8246-4-git-send-email-goffredo.baroncelli@yahoo.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1361627171-8246-1-git-send-email-goffredo.baroncelli@yahoo.com> References: <1361627171-8246-1-git-send-email-goffredo.baroncelli@yahoo.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org From: Goffredo Baroncelli Signed-off-by: Goffredo Baroncelli --- man/btrfs.8.in | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/man/btrfs.8.in b/man/btrfs.8.in index 94f4ffe..e2f86ea 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -31,6 +31,8 @@ btrfs \- control a btrfs filesystem .PP \fBbtrfs\fP \fBfilesystem label\fP\fI [newlabel]\fP .PP +\fBbtrfs\fP \fBfilesystem df\fP\fI [-b] \fIpath [path..]\fR\fP +.PP \fBbtrfs\fP \fBfilesystem balance\fP\fI \fP .PP \fBbtrfs\fP \fBdevice scan\fP\fI [--all-devices| [...]]\fP @@ -266,6 +268,53 @@ NOTE: Currently there are the following limitations: - the filesystem should not have more than one device. .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 + \fBfilesystem show\fR [--all-devices||