Date: Mon, 23 Nov 2015 06:20:36 +0000 From: =?utf-8?B?S2FybGkgU2rDtmJlcmc=?= <karli.sjoberg@slu.se> To: Chris Stankevitz <chris@stankevitz.com> Cc: FreeBSD Filesystems <freebsd-fs@freebsd.org> Subject: Re: Recovering a zfs root pool from backup Message-ID: <1448259637.3588.8.camel@data-b104.adm.slu.se> In-Reply-To: <56524A34.8030806@stankevitz.com> References: <8834bc1f-4e73-4315-a591-a4ff89dc80c9@email.android.com> <56524A34.8030806@stankevitz.com>
next in thread | previous in thread | raw e-mail | index | archive | help
sön 2015-11-22 klockan 15:05 -0800 skrev Chris Stankevitz: > 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? You´re still thinking of doing the restore process from "Machine B". Drop that and do it from "Machine A" instead. Just make sure that you boot "Machine A" from CD/USB. Then there will be no pool called "zroot":) /K > > 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?1448259637.3588.8.camel>
