From owner-freebsd-geom@FreeBSD.ORG Tue Jan 14 01:57:47 2014 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E78531F5 for ; Tue, 14 Jan 2014 01:57:47 +0000 (UTC) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A144F1060 for ; Tue, 14 Jan 2014 01:57:47 +0000 (UTC) Received: from compute3.internal (compute3.nyi.mail.srv.osa [10.202.2.43]) by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 2B6C420E13 for ; Mon, 13 Jan 2014 20:57:46 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute3.internal (MEProxy); Mon, 13 Jan 2014 20:57:46 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; s=smtpout; bh=2ZA t7TbxsiazWrRR5yAsZ+tuxMY=; b=eiE1fM0M6zubHCx1MgbSA44fdSctlIrucm6 xC+v/6aPExKV0JSWDN1Whqbqnbm6Kvb2H5OaZrWxwzZJnzhMGPHEuOElXyT0o6Aw LohJkGkHSd0wsPNUwOvw5i+/mMDP6f8Ofk5FlDUhX3O3Iub0yPtp16l8A6iQ0SuG nbJfF1LU= X-Sasl-enc: +yz/EmCo8GhLtMCD9Ox61BE9ah8hNrCIgqsymY6ed7Wj 1389664665 Received: from [172.16.1.145] (unknown [68.117.126.78]) by mail.messagingengine.com (Postfix) with ESMTPA id 9C375C00E87; Mon, 13 Jan 2014 20:57:45 -0500 (EST) Content-Type: multipart/signed; boundary="Apple-Mail=_2568DAC3-8F87-4AB4-97AC-7995E3070FF3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: "deep" gpart backup? From: Mark Felder In-Reply-To: Date: Mon, 13 Jan 2014 19:57:43 -0600 Message-Id: References: <1023566295.20140105015301@serebryakov.spb.ru> <1389461267.16576.69479689.0A3D893A@webmail.messagingengine.com> To: Marcel Moolenaar 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:57:48 -0000 --Apple-Mail=_2568DAC3-8F87-4AB4-97AC-7995E3070FF3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 13, 2014, at 18:33, Marcel Moolenaar wrote: >=20 > On Jan 11, 2014, at 9:27 AM, Mark Felder wrote: >=20 >> On Sat, Jan 4, 2014, at 15:53, Lev Serebryakov wrote: >>> Hello, Freebsd-geom. >>>=20 >>> 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 :) >>>=20 >>=20 >> If gpart can see and manipulate all of these elements it really = should >> be able to backup and restore them all atomically. >=20 > 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. >=20 You're right. Throwing out that word without thinking carefully was not = smart. After considering the bit of knowledge I have about how geom = operates it wouldn't be able to go a layer deeper without tasting first = unless we somehow teach gpart how to prepare transactions and write the = labels all at once, then re-taste the device. Probably more difficult = than it's worth. I imagine a batch transaction that rolls back to the = previous state could be achieved. Though we all know the attempt would = taint any existing data, but if you're attempting this you should have = already said your farewells to the data anyway :-) > 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 (=3D gpart) be > able to work on the nested partitions. As such, no single > gpart invocation sees all levels of nesting. >=20 Aha, one step ahead of me :-) > 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. >=20 It's pretty low level, but it does seem to be missing some features I = would expect in such a low level utility such as the ability to create = partitions with custom IDs. Being limited to the handful defined in the = gpart man page has caused me problems a few times. See: = http://www.win.tue.nl/~aeb/partitions/partition_types-1.html which are = almost all included in the Linux fdisk utility. Annnnd now something at the end of the gpart man page just caught my = eye: AUTHORS Marcel Moolenaar I'll see my way out :-) --Apple-Mail=_2568DAC3-8F87-4AB4-97AC-7995E3070FF3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJS1JmXAAoJEJg7ZFAfE+JS8qgH/jmOqMNS/EZA+1QQDl8t9VLx o4bnAfzdA/bi36axHK5kWPsdHjNf3vJPyZnppCLWxm91J/o6QpN6JsvJ0L3rCIRn /JkX7vs/7mYGm6FgZdQLCjjlsZdU1bTr0jpsy61AMwp5IAnCzzpNhPqDxBUbFbSy ze4vheigwMUo4TyhBlqoGhBOYSfl3Vtr+cquuA0IP0fMPo7WO5GblrYtU3thPXi9 btpQTGEDwMHgLkfvP36yHb565uge3/vyFjGKZd6803QTcR38EkUoTyrUvQtM56At TldOmZSsrOy8w8QtgTroYJ3DkYe+XHNG2MO3+Rgl1NY+m8TFA/LRyGDETUStJhg= =qzxp -----END PGP SIGNATURE----- --Apple-Mail=_2568DAC3-8F87-4AB4-97AC-7995E3070FF3--