Re: [gentoo-user] preserving zpool mountpoint on boot?

2015-09-14 Thread Nuno Magalhães
I assume your RTFM means set it to legacy and use /etc/fstab?
Seems ucmbersome, but it's worth a try.



Re: [gentoo-user] preserving zpool mountpoint on boot?

2015-09-14 Thread Volker Armin Hemmann
Am 14.09.2015 um 17:38 schrieb Nuno Magalhães:
> I assume your RTFM means set it to legacy and use /etc/fstab?
> Seems ucmbersome, but it's worth a try.
>
>

well, I did and it works.



[gentoo-user] preserving zpool mountpoint on boot?

2015-09-13 Thread 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)?

Thanks,
Nuno



Re: [gentoo-user] preserving zpool mountpoint on boot?

2015-09-13 Thread Volker Armin Hemmann
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.