Discussion:
[gentoo-user] ZFS wiki confusion
(too old to reply)
Douglas J Hunley
2013-04-01 03:10:02 UTC
Permalink
Anyone got ZFS working on their Gentoo install? I'm contemplating it, but
the wiki[1] confuses me a bit. Specifically, section '3 Installing into the
kernel directory (for static installs)' states:
This will generate the needed files, and copy them into the kernel sources
directory.
root # (cd /var/tmp/portage/sys-kernel/spl-9999/work/spl-9999 &&
./copy-builtin /usr/src/linux)
root # (cd /var/tmp/portage/sys-fs/zfs-kmod-9999/work/zfs-kmod-9999/ &&
./copy-builtin /usr/src/linux)
After this, you just need to edit the kernel config to enable CONFIG_SPL
and CONFIG_ZFS and emerge the zfs binaries.
root # mkdir -p /etc/portage/profile
root # echo 'sys-fs/zfs -kernel-builtin' >>
/etc/portage/profile/package.use.mask
root # echo 'sys-fs/zfs kernel-builtin' >> /etc/portage/package.use
root # emerge -1v sys-fs/zfs
The echo's only need to be run once, but the emerge needs to be run every
time you install a new version of zfs.

Do you really need to copy the files into the kernel tree? WTD is a 'static
install' in this context?

'emerge zfs' shows:
Calculating dependencies... done!
[ebuild N ] sys-fs/zfs-0.6.1 USE="rootfs -custom-cflags
(-kernel-builtin) -static-libs -test-suite" 1,500 kB
[ebuild N ] sys-fs/zfs-kmod-0.6.1 USE="rootfs -custom-cflags -debug"
0 kB
[ebuild N ] sys-kernel/spl-0.6.1 USE="-custom-cflags -debug
-debug-log" 209 kB

which seems to pull in the daemon and the kmod so wouldn't the zfs-kmod
ebuild build against the current kernel and drop in the modules directory
all by itself much like any of the 100s of FUSE modules do?

Any clarification on the install process would be appreciated.

[1] - http://wiki.gentoo.org/wiki/ZFS
--
Douglas J Hunley (***@gmail.com)
Twitter: @hunleyd Web:
douglasjhunley.com
G+: http://goo.gl/sajR3
Remy Blank
2013-04-01 08:10:02 UTC
Permalink
Post by Douglas J Hunley
Do you really need to copy the files into the kernel tree?
No, you don't need to do that.
Post by Douglas J Hunley
which seems to pull in the daemon and the kmod so wouldn't the zfs-kmod
ebuild build against the current kernel and drop in the modules
directory all by itself much like any of the 100s of FUSE modules do?
Yes, it's enough to simply emerge the packages, and "modprobe zfs" (and
later add "zfs" to /etc/conf.d/modules). Works fine here.

(Not sure what FUSE has to do with it, though. FUSE filesystems don't
install any kernel modules.)

Just ignore the section "Installing into the kernel directory (for
static installs)" on that page, unless you have a very special install
(but then, you probably wouldn't have to ask here).

-- Remy
Neil Bothwick
2013-04-01 13:20:01 UTC
Permalink
Post by Remy Blank
Just ignore the section "Installing into the kernel directory (for
static installs)" on that page, unless you have a very special install
(but then, you probably wouldn't have to ask here).
Yes, you only need that if you want the modules built into the
kernel. The zfs and spl sources include scripts to install to any kernel
tree, just unpack each source tarbal, cd into the appropriate directory
and run

./configure --enable-linux-builtin --with-linux=/usr/src/linux
./copy-builtin /usr/src/linux

for each.
--
Neil Bothwick

I am McCoy of Bo...Damnit! I'm a doctor, not a collective!
Douglas J Hunley
2013-04-01 16:40:02 UTC
Permalink
Post by Neil Bothwick
Post by Remy Blank
Just ignore the section "Installing into the kernel directory (for
static installs)" on that page, unless you have a very special install
(but then, you probably wouldn't have to ask here).
Yes, you only need that if you want the modules built into the
kernel. The zfs and spl sources include scripts to install to any kernel
tree, just unpack each source tarbal, cd into the appropriate directory
and run
./configure --enable-linux-builtin --with-linux=/usr/src/linux
./copy-builtin /usr/src/linux
for each.
ah! so the 'static' is a reference to non-modular kernel builds. got it.
--
Douglas J Hunley (***@gmail.com)
Twitter: @hunleyd Web:
douglasjhunley.com
G+: http://goo.gl/sajR3
Loading...