From owner-freebsd-geom@FreeBSD.ORG Tue Jan 14 01:22:18 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 00722676; Tue, 14 Jan 2014 01:22:17 +0000 (UTC) Received: from mail.xcllnt.net (mail.xcllnt.net [50.0.150.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CD35C1E23; Tue, 14 Jan 2014 01:22:16 +0000 (UTC) Received: from [192.168.2.84] (50-0-150-213.dsl.static.sonic.net [50.0.150.213]) (authenticated bits=0) by mail.xcllnt.net (8.14.7/8.14.7) with ESMTP id s0E1M8p5036709 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 13 Jan 2014 17:22:09 -0800 (PST) (envelope-from marcel@xcllnt.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: "deep" gpart backup? From: Marcel Moolenaar In-Reply-To: <1389461267.16576.69479689.0A3D893A@webmail.messagingengine.com> Date: Mon, 13 Jan 2014 16:33:39 -0800 Content-Transfer-Encoding: 7bit Message-Id: References: <1023566295.20140105015301@serebryakov.spb.ru> <1389461267.16576.69479689.0A3D893A@webmail.messagingengine.com> To: Mark Felder X-Mailer: Apple Mail (2.1827) Cc: freebsd-geom@freebsd.org X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jan 2014 01:22:18 -0000 On Jan 11, 2014, at 9:27 AM, Mark Felder wrote: > On Sat, Jan 4, 2014, at 15:53, Lev Serebryakov wrote: >> Hello, Freebsd-geom. >> >> Is here any way to make "deep" "gpart backup | gpart restore"? Now, when >> I >> have disk with MBR, with two slices, each of which has BSD label, I need >> three calls of backup / restore commands with proper arguments. It looks >> just stupid :) >> > > If gpart can see and manipulate all of these elements it really should > be able to backup and restore them all atomically. This statement is close to being ridiculous. Being able to operate on all components is absolutely not a sufficient condition for doing atomic operations across a multitude of them. Atomicity is a very particular requirement. Note also that gpart (in its most vague definition) cannot actually manipulate on *all* elements at the same time. Nested partitioning schemes are not seen by the gpart invocation that works on the outer-most container. Only when running gpart on a partition will it (= gpart) be able to work on the nested partitions. As such, no single gpart invocation sees all levels of nesting. gpart is an inherently low-level utility and what you want is intended (i.e. by design) to be handled at an application layer above gpart. FYI, -- Marcel Moolenaar marcel@xcllnt.net