From owner-freebsd-fs@FreeBSD.ORG Sun Sep 18 09:27:33 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02983106564A for ; Sun, 18 Sep 2011 09:27:33 +0000 (UTC) (envelope-from jeremie@le-hen.org) Received: from smtp5-g21.free.fr (unknown [IPv6:2a01:e0c:1:1599::14]) by mx1.freebsd.org (Postfix) with ESMTP id 4DDEC8FC12 for ; Sun, 18 Sep 2011 09:27:30 +0000 (UTC) Received: from endor.tataz.chchile.org (unknown [82.233.239.98]) by smtp5-g21.free.fr (Postfix) with ESMTP id DF115D48132; Sun, 18 Sep 2011 11:27:24 +0200 (CEST) Received: from felucia.tataz.chchile.org (felucia.tataz.chchile.org [192.168.1.9]) by endor.tataz.chchile.org (Postfix) with ESMTP id 11B0333CED; Sun, 18 Sep 2011 09:27:23 +0000 (UTC) Received: by felucia.tataz.chchile.org (Postfix, from userid 1000) id E9E99A1180; Sun, 18 Sep 2011 09:27:22 +0000 (UTC) Date: Sun, 18 Sep 2011 11:27:22 +0200 From: Jeremie Le Hen To: freebsd-fs@FreeBSD.org Message-ID: <20110918092722.GA7930@felucia.tataz.chchile.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Jeremie Le Hen Subject: ZFS on root: / is found but child datasets are not mounted X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Sep 2011 09:27:33 -0000 Hi, Please Cc: me when replying. I bought a new HDD in order to mirror the system disk. This is also a great opportunity to migrate the root filesystem to ZFS. I followed mm@'s advice from another thread: "having everything one level deeper". That is zroot/root is "/". The kernel boots fine, it finds the root filesystem, but fails miserably when running rc.d scripts because child datasets are not mounted (/var, /usr, ...). FWIW, I escaped to DDB and typed "show mount". Besides /dev, / was indeed mounted from zoot/root and /tmp was /dev/md0 for an unknown reason. I've been fiddling this for 3 hours yesterday without luck. Does anyone have an idea on this please? More information: obiwan:~# zpool import -o altroot=/mnt -o cachefile=/tmp/zpool.cache zroot obiwan:~# zpool list zroot NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT zroot 147G 2.34G 145G 1% 1.00x ONLINE /mnt obiwan:~# zpool status zroot pool: zroot state: ONLINE scan: none requested config: NAME STATE READ WRITE CKSUM zroot ONLINE 0 0 0 gptid/080c18f8-c2d2-11e0-baa0-00151724749a ONLINE 0 0 0 errors: No known data errors obiwan:~# zpool get all zroot NAME PROPERTY VALUE SOURCE zroot size 147G - zroot capacity 1% - zroot altroot /mnt local zroot health ONLINE - zroot guid 12889954819379028468 default zroot version 28 default zroot bootfs zroot/root local zroot delegation on default zroot autoreplace off default zroot cachefile /tmp/zpool.cache local zroot failmode wait default zroot listsnapshots off default zroot autoexpand off default zroot dedupditto 0 default zroot dedupratio 1.00x - zroot free 145G - zroot allocated 2.34G - zroot readonly off - obiwan:~# cp /tmp/zpool.cache /mnt/boot/zfs/zpool.cache obiwan:~# grep 'zfs[:_]' /mnt/boot/loader.conf zfs_load="YES" vfs.root.mountfrom="zfs:zroot/root" obiwan:~# zfs list -o name,mounted,canmount,mountpoint -r zroot | grep -v /mnt/jails NAME MOUNTED CANMOUNT MOUNTPOINT zroot no on none zroot/root yes on /mnt zroot/root/root yes on /mnt/root zroot/root/tmp yes on /mnt/tmp zroot/root/usr yes on /mnt/usr zroot/root/usr/local yes on /mnt/usr/local zroot/root/usr/obj yes on /mnt/usr/obj zroot/root/usr/pkgsrc yes on /mnt/usr/pkgsrc zroot/root/usr/pkgsrc/distfiles yes on /mnt/usr/pkgsrc/distfiles zroot/root/usr/ports yes on /mnt/usr/ports zroot/root/usr/ports/distfiles yes on /mnt/usr/ports/distfiles zroot/root/usr/ports/packages yes on /mnt/usr/ports/packages zroot/root/usr/src yes on /mnt/usr/src zroot/root/var yes on /mnt/var zroot/root/var/crash yes on /mnt/var/crash zroot/root/var/db yes on /mnt/var/db zroot/root/var/db/pkg yes on /mnt/var/db/pkg zroot/root/var/empty yes on /mnt/var/empty zroot/root/var/log yes on /mnt/var/log zroot/root/var/mail yes on /mnt/var/mail zroot/root/var/run yes on /mnt/var/run zroot/root/var/tmp yes on /mnt/var/tmp Thanks. Regards, -- Jeremie Le Hen Men are born free and equal. Later on, they're on their own. Jean Yanne