From patchwork Fri Nov 2 10:15:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Goffredo Baroncelli X-Patchwork-Id: 1687771 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id A8C75DF2A2 for ; Fri, 2 Nov 2012 10:15:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934478Ab2KBKPE (ORCPT ); Fri, 2 Nov 2012 06:15:04 -0400 Received: from mail-ee0-f46.google.com ([74.125.83.46]:48646 "EHLO mail-ee0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932906Ab2KBKO7 (ORCPT ); Fri, 2 Nov 2012 06:14:59 -0400 Received: by mail-ee0-f46.google.com with SMTP id b15so1719880eek.19 for ; Fri, 02 Nov 2012 03:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=c05D19lm5IuiFyPzaeCrJ7x/ZFFt6JCCDLFTwZmcL/Q=; b=zVZVyRX/B+aFY2OonqwVubnFJSJjf5gFovcyjuEHjvWlsiGdWeLWrwUQanQtgGhOx/ ox3psrOLiDJvVDghtnaCGZczuoXT7Pg/K2OArGHwyMrV5jrekV8s826ikLfpRBkUthHf ZaMR7ZBmyD+UziCrOryjnlPd1hS/y42KSeXl7e4QR1acTx0G6k8EoJuOVpCl7CvLf9Dy FsD/aT8vR2cwfgTTM5XufQkI0OiwcaxGiASGJlnENaJF0XIGZbXiA8dhPbh9IEB6wNnE 9PnamQ2WgMBruY81fTmBD1Lhue2fu/xjc65m71/Tvweb0o68E9r2PaFzh3aU78yuxXXC +5xw== Received: by 10.14.203.69 with SMTP id e45mr4886987eeo.38.1351851299034; Fri, 02 Nov 2012 03:14:59 -0700 (PDT) Received: from venice..bhome (host103-133-static.242-95-b.business.telecomitalia.it. [95.242.133.103]) by mx.google.com with ESMTPS id z43sm21873483een.16.2012.11.02.03.14.57 (version=SSLv3 cipher=OTHER); Fri, 02 Nov 2012 03:14:58 -0700 (PDT) From: Goffredo Baroncelli To: linux-btrfs@vger.kernel.org Cc: Hugo Mills , Michael =?utf-8?q?Kj=C3=B6rling?= , Martin Steigerwald , cwillu , Chris Murphy , Goffredo Baroncelli Subject: [PATCH 2/8] Create the man page entry for the command btrfs fi df Date: Fri, 2 Nov 2012 11:15:33 +0100 Message-Id: <1351851339-19150-3-git-send-email-kreijack@inwind.it> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1351851339-19150-1-git-send-email-kreijack@inwind.it> References: <1351851339-19150-1-git-send-email-kreijack@inwind.it> 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 9222580..27d0160 100644 --- a/man/btrfs.8.in +++ b/man/btrfs.8.in @@ -27,6 +27,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 \fBsubvolume find-new\fP\fI \fP .PP \fBbtrfs\fP \fBfilesystem balance\fP\fI \fP @@ -242,6 +244,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||