From owner-freebsd-geom@FreeBSD.ORG Thu Nov 18 20:44:33 2010 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F2F4106566C; Thu, 18 Nov 2010 20:44:33 +0000 (UTC) (envelope-from gcr+freebsd-geom@tharned.org) Received: from roadkill.tharned.org (roadkill.tharned.org [75.145.12.185]) by mx1.freebsd.org (Postfix) with ESMTP id D29918FC0C; Thu, 18 Nov 2010 20:44:32 +0000 (UTC) Received: from roadkill.tharned.org (11008@roadkill.tharned.org [75.145.12.185]) (authenticated bits=0) by roadkill.tharned.org (8.14.4/8.14.4) with ESMTP id oAIKiVd4070971 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 Nov 2010 14:44:31 -0600 (CST) (envelope-from gcr+freebsd-geom@tharned.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tharned.org; s=2010; t=1290113072; bh=a9BOW0lBhjyCNmYkkKVKl0GD4tjIIaEM++rEpwvjh5Q=; l=1773; h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References: MIME-Version:Content-Type; b=JZg6KjdrMIZ/o/QInZsdWK+7eQFJi4nFjPekNJ49nbRSC+LgDb+Ebv/+j5QxQsiBd Rl8ncg+oCHw1RfjXUte2FdEMy3j+LVGduCdrJux3rq+vv8ZaOev+RpmNqkyP10/zhI DzolQAGw97fxwqyOH5NPYQ9q/PiPpXX5Td+7Y87Q= Date: Thu, 18 Nov 2010 14:44:31 -0600 (CST) From: Greg Rivers To: Marcel Moolenaar In-Reply-To: <77B931B5-8A25-46AC-B14F-9D5F13A964EB@mac.com> Message-ID: References: <4CE505B2.6010601@yandex.ru> <77B931B5-8A25-46AC-B14F-9D5F13A964EB@mac.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (roadkill.tharned.org [75.145.12.185]); Thu, 18 Nov 2010 14:44:32 -0600 (CST) Cc: "Andrey V. Elsukov" , Marcel Moolenaar , freebsd-geom@freebsd.org Subject: Re: backup a partition table with gpart(8) X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2010 20:44:33 -0000 On Thu, 18 Nov 2010, Marcel Moolenaar wrote: > On Nov 18, 2010, at 10:00 AM, Greg Rivers wrote: >> >> So instead of a special dump command or complicated XML formatting, >> just make "gpart show" output suitable for input (it's probably already >> close), and add the verb to read that input ("gpart read" or "gpart >> apply" or such). Add the ability to handle wildcards and run the >> editor, and gpart could be as friendly to use as bsdlabel is. > > BTW: I don't think bsdlabel is friendly to use at all, so I certainly > hope not that gpart will become as friendly as bsdlabel. It would be a > regression :-) > > I would not try and mix functionality in a single command. Output > suitable for humans is ipso facto unsuitable for machines (and vice > versa). I'm sure there are exceptions, but I do not think gpart is one > of them. > > It's better to introduce gpart backup and gpart restore and have them > optimized for the purpose than it is to try and solve two independent > problems with gpart show, which already has its own problems of > providing user-friendly output. > I appreciate the humor, but I'd hazard a guess that I'm not the only one who misses bsdlabel's functionality in gpart. :-) I did not intend what I said to be taken as criticism of gpart. But bsdlabel's behavior is consistent with fdisk(8) too (-p, -f), and also with Solaris' prtvtoc(1M) and fmthard(1M). Historically, it's pretty much expected that partition managers work that way or at least have that feature. Maybe "gpart show" shouldn't be overloaded, but having something like "gpart backup" and "gpart restore" working on a format that's easily readable and editable by a person would be a real feature. -- Greg