From owner-freebsd-questions@freebsd.org Mon Apr 17 18:41:56 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5560D427B8 for ; Mon, 17 Apr 2017 18:41:56 +0000 (UTC) (envelope-from ml@netfence.it) Received: from smtp209.alice.it (smtp209.alice.it [82.57.200.105]) by mx1.freebsd.org (Postfix) with ESMTP id 6A22724C for ; Mon, 17 Apr 2017 18:41:55 +0000 (UTC) (envelope-from ml@netfence.it) Received: from soth.ventu (79.42.53.222) by smtp209.alice.it (8.6.060.28) (authenticated as acanedi@alice.it) id 58D1259E08CBC638 for freebsd-questions@freebsd.org; Mon, 17 Apr 2017 20:41:49 +0200 Received: from alamar.ventu (alamar.local.netfence.it [10.1.2.18]) by soth.ventu (8.15.2/8.15.2) with ESMTP id v3HIfj7L031339 for ; Mon, 17 Apr 2017 20:41:48 +0200 (CEST) (envelope-from ml@netfence.it) X-Authentication-Warning: soth.ventu: Host alamar.local.netfence.it [10.1.2.18] claimed to be alamar.ventu From: Andrea Venturoli Subject: Some ZFS questions To: freebsd-questions@freebsd.org Message-ID: Date: Mon, 17 Apr 2017 20:41:45 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Apr 2017 18:41:56 -0000 Hello. I'm a novice to ZFS and right now I'm conducting some experiments on 10.3. I've got some questions which might be obvious or FAQs, but I can assure I looked for an afternoon and found no answer. I first installed from the USB image and choose Auto-ZFS options when the installer came to partitioning. The install was succesful and "zfs list" would show something like the following (please note this is not an exact copy & paste, since I destroyed that install in the meantime): > zroot 781M 93.2G 144K none > zroot/ROOT 777M 93.2G 144K none > zroot/ROOT/default 777M 93.2G 777M / > zroot/tmp 176K 93.2G 176K /tmp > zroot/usr 616K 93.2G 144K /usr > zroot/usr/home 184K 93.2G 184K /usr/home > zroot/usr/ports 144K 93.2G 144K /usr/ports > zroot/usr/src 144K 93.2G 144K /usr/src > zroot/var 1.20M 93.2G 608K /var > zroot/var/crash 148K 93.2G 148K /var/crash > zroot/var/log 178K 93.2G 178K /var/log > zroot/var/mail 144K 93.2G 144K /var/mail > zroot/var/tmp 152K 93.2G 152K /var/tmp What puzzles me is "zroot/ROOT": why do we need that? Why do we mount "zroot/ROOT/default" as root instead of simply mounting "zroot" at /? Possibly related... the first thing I wanted to try is how I would deal with big troubles. So I booted again from the USB key, went into live mode and tried mounting the installed system. "zpool import -R /mnt zroot" would complain that /mnt is readonly, so I would end up with zroot mounted on /mnt, but /mnt appearing empty and no other ZFS filesystem mounted. I tried creating /var/mnt (which is r/w) and issued "zpool import -R /var/mnt zroot". No error is displayed, but in /var/mnt I only found the mount points (i.e. /tmp, /usr, /usr/home, etc...), but no file!!! I tried several other ways (like zpool import -N, then using zfs import or mount -t zfs), but none worked properly. Something was achieved by "zpool import -N zroot ; mount -t zfs zroot/ROOT/default /var/mnt": however I could then see *everything* under /var/mnt/, including the content of /usr, /var, etc... which did NOT show as mounted! So I fear writing to this filesystems this way could create a mess. Was I right? Was this ok? How should I mount the main system from an emergency live image? So I redid the install, loosely following > https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/Mirror and > http://daemon-notes.com/articles/system/install-zfs/begin This times I manually created the following structure: > #zfs list > NAME ... MOUNTPOINT > zroot ... / > zroot/usr ... /usr > zroot/var ... /var In fact, from a Live USB key, I can now simply issue "zpool import -R /mnt/ -f zroot" and I'll see all of my filesystems on /mnt. Anything wrong with this setup? I lost the ability to boot via UEFI this way. I've been happily using legacy BIOS in all my boxes until now. Would this be a problem? Is UEFI that better? Lastly: I "restore"d an existing UFS-based system's dump on this box. I was using ezjail there, obviously configured for not using ZFS. Is there any howto for converting ezjail? Or would I do better leaving it as it is? bye & Thanks av.