Date: Mon, 7 Oct 2019 11:19:04 -0400 From: mike tancsa <mike@sentex.net> To: Alejandro Imass <aimass@yabarana.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: Guides for ZFS Full backup to NFS drive and restore from NFS drive Message-ID: <fa7f48da-08fa-497d-37bf-8205d4851d97@sentex.net> In-Reply-To: <CAHieY7RAL4Fpp9E-1gY7=3utX7wi%2BkoBJ%2Btc0KsZTmpk7oLCTg@mail.gmail.com> References: <CAHieY7S5W1NnQp9e=Dk3y_d1bdDgVwyw-3LTK%2BfeoKSDaGDegg@mail.gmail.com> <9177b014-9041-f51e-1856-b6dbdec4afc1@panix.com> <20191005104413.39e3c081.freebsd@edvax.de> <CAHieY7SKdoNcmYG8SR8WWwjT%2BxG_O0A1Gufkhj7GXZpww_fOiw@mail.gmail.com> <e4b66e5a-d722-09bd-863e-542da2e38b13@sentex.net> <CAHieY7RAL4Fpp9E-1gY7=3utX7wi%2BkoBJ%2Btc0KsZTmpk7oLCTg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10/7/2019 11:14 AM, Alejandro Imass wrote: > > > On Mon, Oct 7, 2019 at 8:28 AM mike tancsa <mike@sentex.net > <mailto:mike@sentex.net>> wrote: > > On 10/5/2019 8:35 AM, Alejandro Imass wrote: > > Nope you definitely understood the question precisely. > > What I want to do now is backup the entire system, reconstruct > the raid1 > > pool and then restore the whole system INTACT. > > > Something like this ? > > > Wow Mike ! Thanks a lot for taking the time to provide this step by > step recipe!! > > I will go over it and try it out and document the whole thing with > explanations etc. to try to push some of this info onto the handbook > so that regular users like myself will be able to deal with these > common scenarios. > > I'll keep the list posted on this thread... > > Thanks again!! No problem. Some other notes, if you want to create an actual image that you then want to virtualize, you can use mdconfig to experiment with *Note, if you are restoring a RELENG_10 image* on a RELENG11 image, make sure you grab the boot loader info from a matching RELENG_ image. Also, be aware that if you have a pool name that is not zroot, set the bootfs accordingly Another important note-- if you want to import a RELENG_10 zfs file system into a vm image and then boot that image, you will need to create the zpool image with all feature flags disabled on RELENG12 as the version is different. The *option -d* will do this. Dont forget to use the same boot info as well. So pmbr and gptzfsboot should be sourced from a releng_10 image. #create a RELENG10 vm and then work with it on releng_12 rm server.img truncate -s 1TB server.img mdconfig -f server.img gpart create -s gpt md0 gpart add -s 512 -t freebsd-boot md0 gpart add -s 1G -t freebsd-swap md0 gpart add -t freebsd-zfs md0 gpart bootcode -b /tmp/pmbr -p /tmp/gptzfsboot -i 1 md0 zpool create -d -f -o altroot=/mnt2 -O canmount=off -m none zroot /dev/md0p3 gzcat zroot-.0.gz | zfs recv -vF zroot gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 md0 zpool import -f -o altroot=/mnt2 zroot zpool set bootfs=zroot/ROOT/default zroot Some common problems-- if the machine you are virtualizing does NOT have the virtio drivers, make sure the disk driver you choose in KVM is SATA. Otherwise you get a cryptic "cannot file zfs pool labeled xxx"... thats because there is no "disk" seen by the kernel. Change the driver to be SATA then. Same with network drivers etc. You can load them via kld at the loader prompt if they are not compiled in *if_vtnet_load="YES" virtio_blk_load="YES" virtio_pci_load="YES"* >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?fa7f48da-08fa-497d-37bf-8205d4851d97>