Date: Sun, 22 Nov 2015 15:05:24 -0800 From: Chris Stankevitz <chris@stankevitz.com> To: =?UTF-8?Q?Karli_Sj=c3=b6berg?= <karli.sjoberg@slu.se> Cc: FreeBSD Filesystems <freebsd-fs@freebsd.org> Subject: Re: Recovering a zfs root pool from backup Message-ID: <56524A34.8030806@stankevitz.com> In-Reply-To: <8834bc1f-4e73-4315-a591-a4ff89dc80c9@email.android.com> References: <8834bc1f-4e73-4315-a591-a4ff89dc80c9@email.android.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 11/22/15 12:32 AM, Karli Sjöberg wrote: > > 1. I doubt I can create a new pool called "zroot" on Machine B since it > > is already running a pool called "zroot" > > > > 2. I doubt that this process will create the appropriate "boot sector" > > stuff (I do not know what I am talking about here). > > Exactly. You'd need to boot the machine from CD/USB to be able to > receive the stream. About the boot stuff. That would need to be handled > when partitioning the new drive: > # gpart create -t gpt (a)?da[0-9]+ > # gpart add -t freebsd-boot -s 64k -l boot0 (a)?da[0-9]+ > # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 (a)?da[0-9]+ > # gpart add -t freebsd-swap -b 2048 -s xg -l swap0 (a)?da[0-9]+ > # gpart add -t freebsd-zfs -a 4k -l sys0 (a)?da[0-9]+ > # sysctl vfs.zfs.min_auto_ashift=12 > > Also you need to set the "bootfs" property after the receive: > # zpool set bootfs=zroot zroot Karli, Thank you. Should I be concerned that I cannot "zpool create zroot" from my recovery setup because there will already be a pool with that name? If so, how should I get around that? I know I can give it a temporarily different name and later export/import to rename it -- but it's not clear to me that I will ever get that renamed given that I will always be running FreeBSD with a zroot. Perhaps I could give it a different name "zroot2" (and "zpool set bootfs=zroot2 zroot2")... boot to that... then rename it back to zroot and reboot to complete the restore. Thank you again, Chris
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?56524A34.8030806>