Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Nov 2010 13:53:38 +0300
From:      "Andrey V. Elsukov" <bu7cher@yandex.ru>
To:        freebsd-geom@FreeBSD.org
Cc:        Marcel Moolenaar <marcel@FreeBSD.org>
Subject:   backup a partition table with gpart(8)
Message-ID:  <4CE505B2.6010601@yandex.ru>

next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig1C5A01DA13858C5591855CB2
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

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
=3D>       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.

--=20
WBR, Andrey V. Elsukov


--------------enig1C5A01DA13858C5591855CB2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)

iQEcBAEBAgAGBQJM5QW1AAoJEAHF6gQQyKF6MQwIAJp0guFiqVSv2eP+YHk0PsuP
v+fx9ejObYlZcuVmsdGjXf5+JF1WmuDpj3BXkQb6qDFxMq4ry3RgSdHaNgy5503R
QyWQkrZpKf7E2IFXln3/Drv/Lkewdy+L+ljGPAHFDmwVpu2rZ3G9/1KlSKQ8epKr
sMPQHJAJ0LkEtz7hjwhyhn+Y/hO0K4NyMAevhZ2jMxLO5sj2wxZVOp3zjUgs617J
KWsIJOlcgZLice5n/Npks/AQ3A6o0pnkxncdHwg9NnIQgPe57EOualVRBiMromFZ
38gFLB2KzTnhan+OcYacFFRLBzCdGOYH92XafGxpWjZbfe5rePQN2j1XZ2JjNr0=
=587N
-----END PGP SIGNATURE-----

--------------enig1C5A01DA13858C5591855CB2--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CE505B2.6010601>