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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20190324/c9bbeeb7/attachment.sig>
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 at 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. >
On Sun, Mar 24, 2019, 3:58 PM tech-lists <tech-lists at 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 >I'd create a custom image. First, disable swapping. Change the part type to UFS. Put the image on the swap partition. It can be booted using the next boot feature. It would do a dump of rootfs to the cloud. Once dumped, delete rootfs partition. Then add it back as a freebsd-zfs partition. The image would then create and mount the zfs pool. Fetch the dump image and use restore to put all the files back in place. Reboot. You are done... Warner thanks,> -- > J. >