Editing Install
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 8: | Line 8: | ||
$ md5 OpenZFS_on_OS_X_*.dmg | $ md5 OpenZFS_on_OS_X_*.dmg | ||
− | $ | + | $ sha1sum OpenZFS_on_OS_X_*.dmg |
− | $ | + | $ openssl dgst -sha256 OpenZFS_on_OS_X_*.dmg |
Open the .dmg file. | Open the .dmg file. | ||
Line 18: | Line 18: | ||
Follow the prompts. | Follow the prompts. | ||
− | |||
− | |||
If you ever want to uninstall, follow the instructions for [[Uninstall#Uninstalling_a_release_version|uninstalling a release version]]. | If you ever want to uninstall, follow the instructions for [[Uninstall#Uninstalling_a_release_version|uninstalling a release version]]. | ||
== Installing from source == | == Installing from source == | ||
− | + | (Adapted from an [http://zerobsd.tumblr.com/post/62586498252/os-x-with-zfs article by ZeroBSD].) | |
− | + | If you have any other implementation of ZFS installed, you must uninstall it and reboot before proceeding further. | |
− | + | ||
+ | If you have OpenZFS on OS X installed, please follow the [https://openzfsonosx.org/wiki/Uninstall uninstallation directions] before proceeding. | ||
− | + | We'll need to fetch the latest source from the [https://github.com/openzfsonosx repository on GitHub] and then compile it. | |
− | + | For this, we'll need some prerequisites: | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | For | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
* [https://developer.apple.com/xcode/ Xcode] (from [http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 Mac App Store] or https://developer.apple.com/downloads/index.action) | * [https://developer.apple.com/xcode/ Xcode] (from [http://itunes.apple.com/us/app/xcode/id497799835?ls=1&mt=12 Mac App Store] or https://developer.apple.com/downloads/index.action) | ||
* Xcode Command Line Tools (https://developer.apple.com/downloads/index.action) | * Xcode Command Line Tools (https://developer.apple.com/downloads/index.action) | ||
− | * [http://brew.sh/ Homebrew] (or [http://www.macports.org/ MacPorts]) | + | * [http://brew.sh/ Homebrew] (or [http://www.macports.org/ MacPorts]) |
− | |||
− | |||
− | |||
− | |||
− | |||
To install Homebrew: | To install Homebrew: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | + | ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | |
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Paste that at a Terminal prompt. | |
− | + | ||
− | + | ||
− | + | ||
− | Once Homebrew is installed | + | Once Homebrew is installed, we need a couple of things first: |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | |||
<syntaxhighlight lang="text"> | <syntaxhighlight lang="text"> | ||
brew install automake libtool gawk coreutils | brew install automake libtool gawk coreutils | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | |||
− | + | Create two folders in your home directory. | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | mkdir -p ~/Developer | + | mkdir -p ~/Developer |
− | + | mkdir -p ~/bin | |
− | + | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | Add the ~/bin directory to your PATH. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | + | [[ ! ":$PATH:" == *":$HOME/bin:"* ]] && echo 'export PATH=$HOME/bin:$PATH' >> ~/.bash_profile | |
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | and update your environment by sourcing your profile. | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 142: | Line 70: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | To acquire the sources and build ZFS, we | + | To acquire the sources and build ZFS, we'll need the [[zfsadm]] script found [https://gist.github.com/ilovezfs/7713854#file-zfsadm here]. |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 158: | Line 86: | ||
This will take a few minutes, depending on your hardware. There may be some warnings during the compilation. Do not worry about it unless you see errors. | This will take a few minutes, depending on your hardware. There may be some warnings during the compilation. Do not worry about it unless you see errors. | ||
− | Before using ZFS, we need to actually install it | + | Before using ZFS, we need to actually install it. |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 170: | Line 98: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | kextstat | grep lundman | + | sudo kextstat | grep lundman |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 188: | Line 116: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | And check again. | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | kextstat | grep lundman | + | sudo kextstat | grep lundman |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 200: | Line 128: | ||
sudo kextload spl.kext | sudo kextload spl.kext | ||
sudo kextload -d spl.kext zfs.kext | sudo kextload -d spl.kext zfs.kext | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | Now add /usr/local/sbin to your PATH. This is where you will find the command binaries (zpool, zfs, zdb, etc.). | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | [[ ! ":$PATH:" == *":/usr/local/sbin:"* ]] && echo 'export PATH=/usr/local/sbin:$PATH' >> ~/.bash_profile | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | and update your environment by sourcing your profile again. | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | source ~/.bash_profile | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 205: | Line 145: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | zpool | + | sudo zpool |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 212: | Line 152: | ||
You can go ahead and [[zpool#Creating_a_pool|create your pools]] at this point. | You can go ahead and [[zpool#Creating_a_pool|create your pools]] at this point. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
When you want to get the [https://github.com/openzfsonosx/zfs/commits/master latest commits] from the GitHub, here's a quick overview of things you need to run. | When you want to get the [https://github.com/openzfsonosx/zfs/commits/master latest commits] from the GitHub, here's a quick overview of things you need to run. | ||
Line 242: | Line 157: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | zpool list | + | sudo zpool list |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 251: | Line 166: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | in order to prevent a kernel panic when the kexts are unloaded. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
Make sure they have exported successfully. | Make sure they have exported successfully. | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | zpool status | + | sudo zpool status |
</syntaxhighlight> | </syntaxhighlight> | ||
It should say, "no pools available." | It should say, "no pools available." | ||
− | + | Now you should be able to upgrade your ZFS installation safely. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | Now you should be able to upgrade your ZFS installation. | + | |
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
Line 289: | Line 192: | ||
# Assuming the build completed successfully, | # Assuming the build completed successfully, | ||
− | # unload the kexts. | + | # unload the kexts. If you did not export all of |
+ | # your pools this will panic: | ||
zfsadm -u | zfsadm -u | ||
Line 304: | Line 208: | ||
# And verify they reloaded automatically | # And verify they reloaded automatically | ||
− | kextstat | grep lundman | + | sudo kextstat | grep lundman |
# If not, make sure kextd is aware of them | # If not, make sure kextd is aware of them | ||
− | sudo touch | + | sudo touch /System/Library/Extensions |
sudo killall -HUP kextd | sudo killall -HUP kextd | ||
# and check again | # and check again | ||
− | kextstat | grep lundman | + | sudo kextstat | grep lundman |
# if they they still have not loaded automatically | # if they they still have not loaded automatically | ||
Line 322: | Line 226: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | + | If net.lundman.kernel.dependencies has been updated (quite rare) a reboot would be necessary. | |
+ | |||
If you ever want to uninstall, follow the instructions for [[Uninstall#Uninstalling_a_source_install|uninstalling a source install]]. | If you ever want to uninstall, follow the instructions for [[Uninstall#Uninstalling_a_source_install|uninstalling a source install]]. | ||
+ | |||
+ | == Installing a development build DMG == | ||
+ | |||
+ | Development build DMGs are often released here: http://lundman.net/ftp/osx.zfs/ | ||
+ | |||
+ | * Export your pools and unload the kexts. | ||
+ | |||
+ | * Download one of the builds. | ||
+ | |||
+ | * Open the .dmg file | ||
+ | |||
+ | * cd into either 64 or 32 depending on whether your architecture is i386 or x86_64 | ||
+ | |||
+ | <syntaxhighlight lang="bash"> | ||
+ | cd /Volumes/osx.zfs*/64 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | * Run install_zfs.sh | ||
+ | <syntaxhighlight lang="bash"> | ||
+ | sudo ./install_zfs.sh | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | If you ever want to uninstall, follow the instructions for [[Uninstall#Uninstalling_a_development_build_DMG|uninstalling a development build dmg]]. | ||
== Using without actually installing (development) == | == Using without actually installing (development) == | ||
Line 336: | Line 264: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
− | By default, zfsadm -k will copy spl.kext and zfs.kext from the source where they were built to | + | By default, zfsadm -k will create the directory ~/Library/Extensions if it doesn't exist, remove ~/Library/Extensions/spl.kext and ~/Library/Extensions/zfs.kext if they are present, copy spl.kext and zfs.kext from the source where they were built to ~/Library/Extenions, recursively change the ownership of everything in ~/Library/Extensions/spl.kext and ~/Library/Extensions/zfs.kext to be owned to be owned by the user "root" and the group "wheel," and then load the kexts directly from ~/Library/Extensions. If you prefer to use a different directory, use the -i option in zfsadm or edit zfsadm to hard code a different directory. |
If you do not wish to use zfsadm, you can do all of this yourself, using whatever target directory you'd like. For example, you might do the following: | If you do not wish to use zfsadm, you can do all of this yourself, using whatever target directory you'd like. For example, you might do the following: | ||
Line 346: | Line 274: | ||
cd ~/Developer | cd ~/Developer | ||
− | sudo cp - | + | sudo cp -r zfs/module/zfs/zfs.kext /tmp/o3x/ |
− | sudo cp - | + | sudo cp -r spl/module/spl/spl.kext /tmp/o3x/ |
cd /tmp/o3x | cd /tmp/o3x | ||
Line 358: | Line 286: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | ~/Developer/zfs/cmd.sh zfs | + | sudo ~/Developer/zfs/cmd.sh zfs status |
</syntaxhighlight> | </syntaxhighlight> | ||
− | == Migrating old | + | == Migrating old Pools (from MacZFS or ZEVO) == |
First export all of your pools, and uninstall the other implementation. It is all right if you forgot to export your pools before uninstalling. You will just need to use the '-f' option when importing into OpenZFS on OS X. | First export all of your pools, and uninstall the other implementation. It is all right if you forgot to export your pools before uninstalling. You will just need to use the '-f' option when importing into OpenZFS on OS X. | ||
Line 374: | Line 302: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | zpool status | + | sudo zpool status |
</syntaxhighlight> | </syntaxhighlight> | ||
Line 394: | Line 322: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
− | zpool status | + | sudo zpool status |
</syntaxhighlight> | </syntaxhighlight> | ||