From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 152B51393F1 for ; Mon, 14 Sep 2015 05:30:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DC3C21C09D; Mon, 14 Sep 2015 05:30:39 +0000 (UTC) Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D593021C089 for ; Mon, 14 Sep 2015 05:30:37 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so124558068wic.1 for ; Sun, 13 Sep 2015 22:30:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=yJ5YdfDESShl7CLXm8QWcecv/NbfRkxFWB/2LKI1Dvk=; b=nm+CJdtXSJU/+tvA9tzuOFyQT+vWaXJMZzOlEhJKqEKWbAm/azI0hD0a13ChPo7Fei ZMpJx0o7ILgXz9v5lJ68VoCR6qxzYcf5BnrV2UWlcJJXs+UQ4m4hCkO9yXv5j+3FZJo4 /2XehOuLVg6I5sDjdVGyrtWfKmTygeRzmyLkC/jmNguUFhbJ5LUi2jPMFPNf/UhY1jIa OWAIQWzKAOg1haD1djrZj48Kv8ewtPnd6Db9aRPwZmqIXw7Gc9bvlzvhwubuYNpw9cDw 31bCtP2QiyfvZZsO8lJ9HEWo+uH+ograu37fcUyA3ztuHbzOkOW1GcGg5C/dAXMp3XTL 1Ywg== X-Received: by 10.180.107.1 with SMTP id gy1mr23152313wib.56.1442208636811; Sun, 13 Sep 2015 22:30:36 -0700 (PDT) Received: from [192.168.178.21] (p5B0C4A2C.dip0.t-ipconnect.de. [91.12.74.44]) by smtp.googlemail.com with ESMTPSA id gt4sm12270901wib.21.2015.09.13.22.30.35 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Sep 2015 22:30:36 -0700 (PDT) Subject: Re: [gentoo-user] preserving zpool mountpoint on boot? To: gentoo-user@lists.gentoo.org References: From: Volker Armin Hemmann Message-ID: <55F65B7B.4020305@googlemail.com> Date: Mon, 14 Sep 2015 07:30:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: d7fbeaf1-8569-477d-a4d9-42e17e01b6bf X-Archives-Hash: 7cf76be2506ed89ec3f26f6d73c68445 Am 13.09.2015 um 21:20 schrieb Nuno Magalhães: > Greetings, > > If i export/import a zpool, the altroot property is not preserved so > it always gets mounted at /. > > In /etc/init.d/zfs, the import line reads > $ZPOOL import -c $ZPOOL_CACHE -aN 2>/dev/null || true > so no -options there. > > I've also tried with > zpool import -o altroot=/mnt -o cachefile=/etc/zfs/zpool.cache poolname > which works, but the cache file only lives until export, so i assume > it's not some kind of configuration save point. A simple import > afterwards will place the pool at / again. Same for -R. > > Is there some option i can put in /etc/modprobe.d/zfs.conf (which > currently doesn't exist)? > no man zfs Mount Points Creating a ZFS file system is a simple operation, so the number of file systems per system is likely to be numerous. To cope with this, ZFS automatically manages mounting and unmounting file systems without the need to edit the /etc/fstab file. All automatically managed file sys- tems are mounted by ZFS at boot time. By default, file systems are mounted under /path, where path is the name of the file system in the ZFS namespace. Directories are created and destroyed as needed. A file system can also have a mount point set in the mountpoint property. This directory is created as needed, and ZFS automatically mounts the file system when the zfs mount -a command is invoked (without editing /etc/fstab). The mountpoint property can be inherited, so if pool/home has a mount point of /export/stuff, then pool/home/user automatically inherits a mount point of /export/stuff/user. A file system mountpoint property of none prevents the file system from being mounted. If needed, ZFS file systems can also be managed with traditional tools (mount, umount, /etc/fstab). If a file system's mount point is set to legacy, ZFS makes no attempt to manage the file system, and the administrator is responsible for mounting and unmounting the file system.