Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Mar 2019 16:16:32 -0600
From:      Alan Somers <asomers@freebsd.org>
To:        tech-lists <tech-lists@zyxst.net>
Cc:        FreeBSD <freebsd-stable@freebsd.org>, freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: ufs to zfs conversion in a freebsd guest
Message-ID:  <CAOtMX2h8TY9UA4RxJvZXVU0NLt9DMjKnLnBMfMScWAj_=fK%2B9A@mail.gmail.com>
In-Reply-To: <20190324215638.GA1486@rpi3.zyxst.net>
References:  <20190324215638.GA1486@rpi3.zyxst.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Yes, but it's probably not worth the effort. Easier to spin up 2nd vm and
copy everything over. Here is what you'd have to do:
1) shrink the root filesystem with resizefs.
2) shrink it's partition with gpart.  If it's not the last partition on the
disk, then you'll have to relocate the last (presumably swap) partition.
3) create a new zfs partition.
4) create a new zfs pool.
5) create all of the various zfs datasets just like the installer does.
6) copy over everything from / to the zfs partition except for /boot.
7) configure loader.conf to boot from zfs.  Assuming, that is, that your VM
system even runs the regular boot loader.
8) reboot and pray.
9) spin up a new VM anyway, since you inevitably screwed up something.

Good luck.

On Sun, Mar 24, 2019, 3:57 PM tech-lists <tech-lists@zyxst.net wrote:

> Hi
>
> [context is freebsd-12R-p3]
>
> Is it possible to convert a running freebsd guest from UFS to ZFS?
> It would need to be done in-situ, in the guest as there is no access to
> the host.
>
> The guest filesystem is:
>
> /dev/gpt/rootfs   /       ufs     rw      1       1
> /dev/gpt/swapfs  none    swap    sw      0       0
>
> thanks,
> --
> J.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2h8TY9UA4RxJvZXVU0NLt9DMjKnLnBMfMScWAj_=fK%2B9A>