1 |
On Mon, 26 Aug 2013 09:16:44 -0400, Tanstaafl wrote: |
2 |
|
3 |
> > You can get ZFS on Linux with relative ease, you just have to build it |
4 |
> > yourself. Distros feel they can't redistribute that code. |
5 |
> |
6 |
> I know you can do this as a module - but is there an overlay or patch |
7 |
> to get it built directly into the kernel? I'd love to use ZFS on my |
8 |
> gentoo server, but I disable modules on servers for security reasons. |
9 |
|
10 |
You can do it. You have to unmask the kernel_builtin USE flag to stop zfs |
11 |
bringing in zfs_kmod, then unpack the sources and run the script to |
12 |
install them into the kernel tree. |
13 |
|
14 |
I run this script after emerging a new kernel |
15 |
|
16 |
================================================== |
17 |
|
18 |
#!/bin/sh |
19 |
|
20 |
[[ -f /usr/src/linux/.config ]] || zcat /proc/config.gz |
21 |
>/usr/src/linux/.config |
22 |
|
23 |
SPL_EBUILD=$(ls -1 /var/portage/sys-kernel/spl/spl-0* | tail -n 1) |
24 |
ZFS_EBUILD=$(ls -1 /var/portage/sys-fs/zfs/zfs-0* | tail -n 1) |
25 |
|
26 |
SPL_DIR=$(ebuild $SPL_EBUILD clean prepare | awk '/Preparing source in/ |
27 |
{print $5}') ZFS_DIR=$(ebuild $ZFS_EBUILD clean prepare | awk '/Preparing |
28 |
source in/ {print $5}') |
29 |
|
30 |
cd $SPL_DIR |
31 |
./configure --enable-linux-builtin --with-linux=/usr/src/linux |
32 |
./copy-builtin /usr/src/linux |
33 |
|
34 |
cd $ZFS_DIR |
35 |
./configure --enable-linux-builtin --with-linux=/usr/src/linux |
36 |
--with-spl=$SPL_DIR ./copy-builtin /usr/src/linux |
37 |
|
38 |
================================================== |
39 |
|
40 |
Then run make oldconfig and compile as usual. |
41 |
|
42 |
|
43 |
-- |
44 |
Neil Bothwick |
45 |
|
46 |
Cross-country skiing is great in small countries. |