From patchwork Tue Oct 29 17:56:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 11218401 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 169FC1515 for ; Tue, 29 Oct 2019 18:10:44 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id F1A1C20862 for ; Tue, 29 Oct 2019 18:10:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F1A1C20862 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from new-ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 5BF56100EA534; Tue, 29 Oct 2019 11:11:25 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=dan.j.williams@intel.com; receiver= Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E7934100EEB9C for ; Tue, 29 Oct 2019 11:11:22 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 11:10:40 -0700 X-IronPort-AV: E=Sophos;i="5.68,244,1569308400"; d="scan'208";a="193689577" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Oct 2019 11:10:40 -0700 Subject: [ndctl PATCH] ndctl/namespace: Clarify that 'reconfigure' == 'destroy+create' From: Dan Williams To: vishal.l.verma@intel.com Date: Tue, 29 Oct 2019 10:56:23 -0700 Message-ID: <157237178347.4146560.10127156903020487402.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 Message-ID-Hash: HOVPRJPBPRFIK7QFJDR77M2VSWBCGAR6 X-Message-ID-Hash: HOVPRJPBPRFIK7QFJDR77M2VSWBCGAR6 X-MailFrom: dan.j.williams@intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header CC: Seema Pandit , Bharath Venkatesh , linux-nvdimm@lists.01.org X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: The 'reconfigure' option to create-namespace is simply a shortcut for the following flow: - Read all parameters from @victim_namespace - Destroy @victim_namespace - Create @new_namespace merging old parameters with new ones Critically this process makes no attempt to preserve data. In fact previous data is almost always destroyed except for cases where the mode remains 'raw' over the transition. Even there the create step may choose new free space for @new_namespace that was not previously allocated to @victim_namespace. For reconfigurations where the target mode is 'fsdax' or 'devdax' any size increase may increase the size of metadata needed at the start of the namespace and overwrite previous data from @victim_namespace. Highlight these details in the man page to preclude assumptions that the a namespace can be reconfigured while keeping existing data intact. Reported-by: Seema Pandit Reported-by: Bharath Venkatesh Signed-off-by: Dan Williams --- Documentation/ndctl/ndctl-create-namespace.txt | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/Documentation/ndctl/ndctl-create-namespace.txt b/Documentation/ndctl/ndctl-create-namespace.txt index e29a5e75e43c..45a4c4c2f408 100644 --- a/Documentation/ndctl/ndctl-create-namespace.txt +++ b/Documentation/ndctl/ndctl-create-namespace.txt @@ -116,12 +116,21 @@ OPTIONS -e:: --reconfig=:: - Reconfigure an existing namespace (change the mode, sector size, - etc...). All namespace parameters, save uuid, default to the - current attributes of the specified namespace. The namespace is - then re-created with the specified modifications. The uuid is - refreshed to a new value by default whenever the data layout of - a namespace is changed, see --uuid= to set a specific uuid. + Reconfigure an existing namespace. This option is a shortcut for + the following sequence: + + - Read all parameters from @victim_namespace + - Destroy @victim_namespace + - Create @new_namespace merging old parameters with new ones +:: + Note that the major implication of a destroy-create cycle is + that data from @victim_namespace is not preserved in + @new_namespace. The attributes transferred from + @victim_namespace are the geometry, mode, and name (not uuid + without --uuid=). No attempt is made to preserve the data and + any old data that is visible in @new_namespace is by coincidence + not convention. "Backup and restore" is the only reliable method + to populate @new_namespace with data from @victim_namespace. -u:: --uuid=::