Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2010 09:50:16 -0800
From:      Marcel Moolenaar <xcllnt@mac.com>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        Marcel Moolenaar <marcel@FreeBSD.org>, freebsd-geom@FreeBSD.org
Subject:   Re: backup a partition table with gpart(8)
Message-ID:  <8F0B61E9-D84C-4C3F-92CA-C24BC53B9C27@mac.com>
In-Reply-To: <4CE505B2.6010601@yandex.ru>
References:  <4CE505B2.6010601@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help

On Nov 18, 2010, at 2:53 AM, Andrey V. Elsukov wrote:

> Hi, Marcel and All.
> 
> I'm thinking about such feature like ability to dump partition
> table into file from which it can be recovered in the future.
> Also it can be used to copy partition table to another device.
> 
> At the moment i think that just print out a list of commands that
> should be done to create the same table it is the easiest way.
> For example:
>> gpart show ada1
> =>       34  320172989  ada1  GPT  (153G)
>         34        512     1  freebsd-boot  (256K)
>        546    8388608     2  freebsd-swap  (4.0G)
>    8389154  311783869     3  freebsd-zfs  (149G)
> 
>> gpart dump -f x ada1
> geom part create -s gpt -f x ada1
> geom part add -b 34 -s 512 -i 1 -t freebsd-boot -f x ada1
> geom part add -b 546 -s 8388608 -i 2 -t freebsd-swap -f x ada1
> geom part add -b 8389154 -s 311783869 -i 3 -t freebsd-zfs -f x ada1
> 
> Any comments and ideas are welcome.

I think you're on the right track. A binary dump is definitely
not useful. Dumping in a replayable form definitely has its
advantages. I have no strong opinions yet as to the exact form
and/or shape (i.e. script vs. XML).

-- 
Marcel Moolenaar
xcllnt@mac.com






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8F0B61E9-D84C-4C3F-92CA-C24BC53B9C27>