Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2019 16:10:56 -0400
From:      Mike Tancsa <mike@sentex.net>
To:        Carl Johnson <carlj@peak.org>, freebsd-questions@freebsd.org
Subject:   Re: mounting from zfs:zroot/ROOT/default failed with error 45 (solved!)
Message-ID:  <f81e156b-16dc-2649-9ca9-733f8ae5f937@sentex.net>
In-Reply-To: <86ftqsqzbu.fsf@elm.localnet>
References:  <98a58bad-56ea-c598-2944-e4c70c2841a3@sentex.net> <a9983106-c8c3-5d4d-f1c0-b90bff86d950@sentex.net> <d04de27b-ef00-1ec8-7c1f-534400a4e453@sentex.net> <724a9bc6-4dd1-f383-b1c7-8cfb564c1bfd@cyberleo.net> <d2596939-69cc-cd88-4a60-7612cd33dd4d@sentex.net> <86ftqsqzbu.fsf@elm.localnet>

next in thread | previous in thread | raw e-mail | index | archive | help
On 4/8/2019 11:41 AM, Carl Johnson wrote:
> Mike Tancsa <mike@sentex.net> writes:
>
>> However, there doesnt seem to be a way to create the pool with feature=
s
>> disabled. The man page seems to imply that as well, at least on FreeBS=
D
>> ? And trying to set it implies that as well.
> At least on FreeBSD-12 there is the -d option for 'zpool create'.  From=

> the zpool manpage:
>
>          -d      Do not enable any features on the new pool.  Individua=
l
>                  features can be enabled by setting their corresponding=

>                  properties to enabled with the -o option.  See
>                  zpool-features(7) for details about feature properties=
=2E
>
>
Thanks so much, that did the trick!!!=C2=A0 This is great, it saves a gre=
at
deal of time being able to do this right on the file server.=C2=A0 I was =
able
to create the zfs device on RELENG_12, gzcat .. | zfs recv=C2=A0 it and t=
hen
boot up the new VM nice and quick.

For the archives, here are the steps I did.=C2=A0 Starting with a backup =
of
the file system made with

Send the contents of
=C2=A0send -Rv zroot@fullsnapshot=C2=A0
to a file on a backup server. e.g. I did this over nfs

send -Rv zroot@fullsnapshot > /nfsbackup/zroot.zfs
cp -p /boot/gptzfsboot=C2=A0 /nfsbackup/gptzfsboot.releng10
cp -p=C2=A0 /boot/pmbr /nfsbackup/pmbr.releng10


On the nfs server where you are going to create the VM image suitable
for importing into KVM

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 pmbr.releng10 -p gptzfsboot.releng10 -i 1 md0
zpool create -d -f -o altroot=3D/mnt2 -O canmount=3Doff -m none zroot /de=
v/md0p3
cat zroot.zfs | zfs recv -vF zroot
zpool import -f -o altroot=3D/mnt2=C2=A0 zroot
zpool set bootfs=3Dzroot/ROOT/default zroot
zpool export zroot
mdconfig -d -u 0


The resultant file server.img can then be imported into your hypervisor
(in this case, KVM)

---Mike

--=20
-------------------
Mike Tancsa, tel +1 519 651 3400 x203
Sentex Communications, mike@sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada  =20





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?f81e156b-16dc-2649-9ca9-733f8ae5f937>