From patchwork Fri Apr 11 02:43:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 3965991 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8D93E9F374 for ; Fri, 11 Apr 2014 02:43:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E1B620807 for ; Fri, 11 Apr 2014 02:43:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 19DC4201B9 for ; Fri, 11 Apr 2014 02:43:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754591AbaDKCnA (ORCPT ); Thu, 10 Apr 2014 22:43:00 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:57198 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754560AbaDKCm7 (ORCPT ); Thu, 10 Apr 2014 22:42:59 -0400 X-IronPort-AV: E=Sophos;i="4.97,837,1389715200"; d="scan'208";a="29127607" Received: from unknown (HELO edo.cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 11 Apr 2014 10:40:31 +0800 Received: from G08CNEXCHPEKD03.g08.fujitsu.local (localhost.localdomain [127.0.0.1]) by edo.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id s3B2gtEA027113; Fri, 11 Apr 2014 10:42:56 +0800 Received: from adam-work.lan (10.167.226.24) by G08CNEXCHPEKD03.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.146.2; Fri, 11 Apr 2014 10:42:56 +0800 From: Qu Wenruo To: CC: Marc MERLIN Subject: [PATCH 1/2] btrfs-progs: Add device management related paragraph. Date: Fri, 11 Apr 2014 10:43:52 +0800 Message-ID: <1397184233-18535-1-git-send-email-quwenruo@cn.fujitsu.com> X-Mailer: git-send-email 1.9.2 MIME-Version: 1.0 X-Originating-IP: [10.167.226.24] 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, 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 Add device management related paragraph to better explain btrfs device management. Cc: Marc MERLIN Signed-off-by: Qu Wenruo --- Documentation/btrfs-balance.txt | 3 +++ Documentation/btrfs-device.txt | 42 +++++++++++++++++++++++++++++++++++++++++ Documentation/btrfs-replace.txt | 4 ++++ 3 files changed, 49 insertions(+) diff --git a/Documentation/btrfs-balance.txt b/Documentation/btrfs-balance.txt index 2289fdf..1b1861c 100644 --- a/Documentation/btrfs-balance.txt +++ b/Documentation/btrfs-balance.txt @@ -14,6 +14,8 @@ DESCRIPTION 'btrfs balance' is used to balance chunks in a btrfs filesystem across multiple or even single device. +See `btrfs-device`(8) for more details about the effect on device management. + SUBCOMMAND ---------- :: @@ -75,3 +77,4 @@ further details. SEE ALSO -------- `mkfs.btrfs`(8), +`btrfs-device`(8) diff --git a/Documentation/btrfs-device.txt b/Documentation/btrfs-device.txt index 20d7bcd..474d411 100644 --- a/Documentation/btrfs-device.txt +++ b/Documentation/btrfs-device.txt @@ -14,6 +14,46 @@ DESCRIPTION 'btrfs device' is used to control the btrfs devices, since btrfs can be used across several devices, 'btrfs device' is used for multiple device management. +DEVICE MANAGEMENT +----------------- +Btrfs filesystem is capable to manage multiple devices. + +Btrfs filesystem use different profiles to manage different RAID level, and +use balance to rebuild chunks, also devices can be added/removed/replace +online. + +Profile:: +Btrfs filesystem use data/metadata profiles to manage allocation/duplication +mechanism. Profiles like RAID level can be assigned to data and metadata separately. ++ +See `mkfs.btrfs`(8) for more details. + +RAID level:: +Btrfs filesystem supports most of the standard RAID level: 0/1/5/6/10. +RAID levels can be assigned at mkfs time or online. ++ +See `mkfs.btrfs`(8) for mkfs time RAID level assign and `btrfs-balance`(8) for +online RAID level assign. + +Balance:: +`btrfs-balance`(8) subcommand can be used to balance or rebuild chunks to the +desired profile. ++ +Due to the fact that balance can rebuild/recovery chunks according to its RAID +duplication if possible, so when using RAID1/5/6/10 with some devices failed +and you just added a new device to btrfs using `btrfs-device`(8), you should +run `btrfs-balance`(8) to rebuild the chunks. ++ +See `btrfs-balance`(8) for more details. + +Device add/remove/replace:: +Device can be added/removed using `btrfs-replace`(8) subcommand and replaced +using `btrfs-replace`(8). ++ +When device is removed or replaced, btrfs will do the chunk rebuild if needed. ++ +See `btrfs-replace`(8) and this man page for more details. + SUBCOMMAND ---------- 'add' [-Kf] [...] :: @@ -73,3 +113,5 @@ further details. SEE ALSO -------- `mkfs.btrfs`(8), +`btrfs-replace`(8), +`btrfs-balance`(8) diff --git a/Documentation/btrfs-replace.txt b/Documentation/btrfs-replace.txt index 8c5dcc4..15a46c2 100644 --- a/Documentation/btrfs-replace.txt +++ b/Documentation/btrfs-replace.txt @@ -13,6 +13,9 @@ DESCRIPTION ----------- 'btrfs replace' is used to replace btrfs managed devices with other device. +It is recommended to see `btrfs-device`(8) for more details about btrfs device +management. + SUBCOMMAND ---------- 'start' [-Bfr] | :: @@ -74,3 +77,4 @@ further details. SEE ALSO -------- `mkfs.btrfs`(8), +`btrfs-device`(8),