Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

RFC for zfs tests. #246

Closed
jcumming wants to merge 8 commits intoNixOS:masterfrom
jcumming:zfs.130902
Closed

RFC for zfs tests. #246
jcumming wants to merge 8 commits intoNixOS:masterfrom
jcumming:zfs.130902

Conversation

@jcumming
Copy link
Copy Markdown

@jcumming jcumming commented Sep 7, 2013

This is a work in process. This isn't intended for merging quite yet..

This patchset adds support, documentation, and tests for installing NixOS to a ZFS partition. Booting off of ZFS is probably possible with a sufficient of grub-fu, but currently only separate boot/root is tested.

There is also a new test for running the zfs unit tests.

Dodgy bits:

  • I had to bump up the amount of memory for the VMs from 384MiB to 768MiB. Don't know a way around this, but maybe we could isolate it to this test?
  • I changed the qemu cache policy for the virtual drives from 'writeback' to 'writethrough', as ztest was failing
  • I added 'zfs' to supported filesystems on the ISO. I'm not sure if this makes the ISO distributable (because of the CDDL). This is probably fixable by installing the zfs software/kernel modules before creating the filesystems, but I'm not sure the best way to do that.

Put the zfs, ztest, zdb and zpool binaries in ../bin so that they get
patchelf'd by the initrd builder

Move restartIfChanged attribute to where it is being heeded.

Ignore failures in zfs mount, and zpool imports.

Make zpool import wanted by the filesystem target, otherwise it might
not happen.
Remove caching and compression on the zvol used for swap, in the event
of a low memory condition, this means less chance of an expensive RMW
.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be wrapped down to 72 columns.

@Shados
Copy link
Copy Markdown
Member

Shados commented Sep 30, 2013

I don't have anything to say regarding the tests, not being sufficiently familiar with NixOS, but on the ISO distribution issue, there's this from the ZOL FAQ (emphasis mine):

The combination of them causes problems because it prevents using pieces of code exclusively available under one license with pieces of code exclusively available under the other in the same binary. In the case of the kernel, this prevents us from distributing ZFS as part of the kernel binary. However, there is nothing in either license that prevents distributing it in the form of a binary module or in the form of source code.

Seeing as you'd only be distributing it as a separate binary module, it looks like it shouldn't be an issue.

On another note, I've been using this set of commits on one of my systems to enable a ZFS root, and it has worked well for me thus far :).

@jcumming
Copy link
Copy Markdown
Author

jcumming commented Oct 1, 2013

I think all I really need to do is issue the correct variant of nix-env -i kernelPackages.zfs, and load the modules. Now that I have a fast box with lots of memory, I should be able to fix this up.

@Shados; if you're feeling adventurous, you could try setting up bootable zfs. It was more grub than I could stomach..

@vcunat
Copy link
Copy Markdown
Member

vcunat commented Aug 12, 2014

Well, what is the status of this ancient PR?

@jcumming
Copy link
Copy Markdown
Author

I will close this PR, port the tests, and open a new PR.

@jcumming jcumming closed this Nov 16, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants