Date: Thu, 18 Nov 2010 14:44:31 -0600 (CST) From: Greg Rivers <gcr+freebsd-geom@tharned.org> To: Marcel Moolenaar <xcllnt@mac.com> Cc: "Andrey V. Elsukov" <bu7cher@yandex.ru>, Marcel Moolenaar <marcel@freebsd.org>, freebsd-geom@freebsd.org Subject: Re: backup a partition table with gpart(8) Message-ID: <alpine.BSF.2.00.1011181415490.70710@roadkill.tharned.org> In-Reply-To: <77B931B5-8A25-46AC-B14F-9D5F13A964EB@mac.com> References: <4CE505B2.6010601@yandex.ru> <alpine.BSF.2.00.1011181137250.69496@roadkill.tharned.org> <77B931B5-8A25-46AC-B14F-9D5F13A964EB@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1011181415490.70710>