From owner-freebsd-stable@freebsd.org Sun Mar 24 22:16:53 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38C871546469; Sun, 24 Mar 2019 22:16:53 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-lj1-f179.google.com (mail-lj1-f179.google.com [209.85.208.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3C17F6B03D; Sun, 24 Mar 2019 22:16:52 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-lj1-f179.google.com with SMTP id t13so6105674lji.2; Sun, 24 Mar 2019 15:16:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pE6J7RPAKrFKP0SYE85zbLBBPOVvTd4s3jXwjl4cqMQ=; b=dBhi4NPhzqZTn8bP6Nsc6B8acv98LHLQ/K2m/mnQkrwuHXBsrVYc0BzsOQSsbFCHI0 CjVuJQS0n0D3uoN01fBjXKDvPaxQ2TQ5opMu/3VLsxMveDIU/KcpLfybYTe34vmI5Zj3 +T4szyxE4yvjme7/Z28661GN6LpccidbS4urGGpwz996V9SLnX1vCYW6emKlCQPFDUDi ySGmCg/KBFeL5OHqotf/tz47IOsD0T61of3g1l1CUYhypwtdkR922S8oOfezacDV1FI3 24qY1cZazA9juGkxmT514gDdMdzqeiSgtC9SAgA/1wUJzv6GMOxUqZPCHOrEdMBgZmPs tUNg== X-Gm-Message-State: APjAAAVvAn+3iQ2aEBdIW7rKGSLNCtNb5aWZF8KYRuGzJKExrlJLbPEN qqAa11Ov+oNWepnvGdcYnf3KXszy/APXj2YfRilmJA== X-Google-Smtp-Source: APXvYqyuvGXufhrwx1BEIpYJcIzrAGYQQWc36kDT8G7oW5GzkVtNrQtrQ0lz0W2mXXYTNH9q5stRNOrknbnbVPGrBS4= X-Received: by 2002:a2e:5c7:: with SMTP id 190mr11007523ljf.108.1553465805029; Sun, 24 Mar 2019 15:16:45 -0700 (PDT) MIME-Version: 1.0 References: <20190324215638.GA1486@rpi3.zyxst.net> In-Reply-To: <20190324215638.GA1486@rpi3.zyxst.net> From: Alan Somers Date: Sun, 24 Mar 2019 16:16:32 -0600 Message-ID: Subject: Re: ufs to zfs conversion in a freebsd guest To: tech-lists Cc: FreeBSD , freebsd-fs X-Rspamd-Queue-Id: 3C17F6B03D X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.179 as permitted sender) smtp.mailfrom=asomers@gmail.com X-Spamd-Result: default: False [-2.98 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.997,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; MIME_TRACE(0.00)[0:+,1:+]; DMARC_NA(0.00)[freebsd.org]; NEURAL_SPAM_SHORT(0.36)[0.356,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[179.208.85.209.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; IP_SCORE(-1.33)[ip: (-0.59), ipnet: 209.85.128.0/17(-3.87), asn: 15169(-2.14), country: US(-0.07)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Mar 2019 22:16:53 -0000 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 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. >