mounting from zfs:zroot/ROOT/default failed with error 45 (solved!)
Mike Tancsa
mike at sentex.net
Mon Apr 8 20:11:06 UTC 2019
On 4/8/2019 11:41 AM, Carl Johnson wrote:
> Mike Tancsa <mike at sentex.net> writes:
>
>> However, there doesnt seem to be a way to create the pool with features
>> disabled. The man page seems to imply that as well, at least on FreeBSD
>> ? 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. Individual
> features can be enabled by setting their corresponding
> properties to enabled with the -o option. See
> zpool-features(7) for details about feature properties.
>
>
Thanks so much, that did the trick!!! This is great, it saves a great
deal of time being able to do this right on the file server. I was able
to create the zfs device on RELENG_12, gzcat .. | zfs recv it and then
boot up the new VM nice and quick.
For the archives, here are the steps I did. Starting with a backup of
the file system made with
Send the contents of
send -Rv zroot at fullsnapshot
to a file on a backup server. e.g. I did this over nfs
send -Rv zroot at fullsnapshot > /nfsbackup/zroot.zfs
cp -p /boot/gptzfsboot /nfsbackup/gptzfsboot.releng10
cp -p /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=/mnt2 -O canmount=off -m none zroot /dev/md0p3
cat zroot.zfs | zfs recv -vF zroot
zpool import -f -o altroot=/mnt2 zroot
zpool set bootfs=zroot/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
--
-------------------
Mike Tancsa, tel +1 519 651 3400 x203
Sentex Communications, mike at sentex.net
Providing Internet services since 1994 www.sentex.net
Cambridge, Ontario Canada
More information about the freebsd-questions
mailing list