Last modified by Drunk Monkey on 2024-09-01 12:35

Show last authors
1 {{box title="**Archivist Note:**"}}
2 These pages were retrieved from archive.org as the original blog has gone dark. I've preserved them as I found the information both clear and useful when I was first learning about managing the ZFS file system.
3
4 As of today (2024), some of this information may be out of date as support for ZFS under linux has improved considerably. However, the basic administration commands remain the same.
5
6 - Drunk Monkey
7 2024-Aug-31
8 {{/box}}
9
10 = Install ZFS on Debian GNU/Linux =
11
12 == Table of Contents ==
13
14 (% class="row" %)
15 (((
16 (% class="col-xs-12 col-xs-4" %)
17 (((
18 **Zpool Administration**
19 0. [[Install ZFS on Debian GNU/Linux>>doc:]]
20 ~1. [[VDEVs>>doc:.ZFS-Administration-Part-I-VDEVs.WebHome]]
21 2. [[RAIDZ>>doc:.ZFS-Administration-Part-II-RAIDZ.WebHome]]
22 3. [[The ZFS Intent Log (ZIL)>>doc:.ZFS-Administration-Part-III-The-ZFS-Intent-Log.WebHome]]
23 4. [[The Adjustable Replacement Cache (ARC)>>doc:.ZFS-Administration-Part-IV-The-Adjustable-Replacement-Cache.WebHome]]
24 5. [[Exporting and Importing Storage Pools>>doc:.ZFS-Administration-Part-V-Exporting-and-Importing-zpools.WebHome]]
25 6. [[Scrub and Resilver>>doc:.ZFS-Administration-Part-VI-Scrub-and-Resilver.WebHome]]
26 7. [[Getting and Setting Properties>>doc:.ZFS-Administration-Part-XVI-Getting-and-Setting-Properties.WebHome]]
27 8. [[Best Practices and Caveats>>doc:.ZFS-Administration-Part-XVII-Best-Practices-and-Caveats.WebHome]]
28 )))
29
30 (% class="col-xs-12 col-xs-4" %)
31 (((
32 **ZFS Administration**
33 9. [[Copy-on-write>>doc:.ZFS-Administration-Part-IX-Copy-on-write.WebHome]]
34 10. [[Creating Filesystems>>doc:.ZFS-Administration-Part-X-Creating-Filesystems.WebHome]]
35 ~11. [[Compression and Deduplication>>doc:.ZFS-Administration-Part-XI-Compression-and-Deduplication.WebHome]]
36 12. [[Snapshots and Clones>>doc:.ZFS-Administration-Part-XII-Snapshots-and-Clones.WebHome]]
37 13. [[Sending and Receiving Filesystems>>doc:.ZFS-Administration-Part-XIII-Sending-and-Receiving-Filesystems.WebHome]]
38 14. [[ZVOLs>>doc:.ZFS-Administration-Part-XIV-ZVOLS.WebHome]]
39 15. [[iSCSI, NFS and Samba>>doc:.ZFS-Administration-Part-XV-iSCSI-NFS-and-Samba.WebHome]]
40 16. [[Getting and Setting Properties>>doc:.ZFS-Administration-Part-XVI-Getting-and-Setting-Properties.WebHome]]
41 17. [[Best Practices and Caveats>>doc:.ZFS-Administration-Part-XVII-Best-Practices-and-Caveats.WebHome]]
42 )))
43
44 (% class="col-xs-12 col-xs-4" %)
45 (((
46 **Appendices**
47 A. [[Visualizing The ZFS Intent Log (ZIL)>>doc:.ZFS-Administration-Appendix-A-Visualizing-The-ZFS-Intent-LOG-ZIL.WebHome]]
48 B. [[Using USB Drives>>doc:.ZFS-Administration-Appendix-B-Using-USB-Drives.WebHome]]
49 C. [[Why You Should Use ECC RAM>>doc:.ZFS-Administration-Appendix-C-Why-You-Should-Use-ECC-RAM.WebHome]]
50 D. [[The True Cost Of Deduplication>>doc:.ZFS-Administration-Appendix-D-The-True-Cost-Of-Deduplication.WebHome]]
51 E. [[How A ZIL Improves Disk Latencies>>doc:.ZFS-Administration-Appendix-E-How-A-ZIL-Improves-Disk-Latencies.WebHome]]
52
53
54 )))
55 )))
56
57 ----
58
59 **UPDATE (May 06, 2012)**: I apologize for mentioning it supports encryption. Pool version 28 is the latest source that the Free Software community has. Encryption was not added until pool version 30. So, encryption is not supported natively with the ZFS on Linux project. However, you can use LUKS containers underneath, or you can use Ecryptfs for the entire filesystem, which would still give you all the checksum, scrubbing and data integrity benefits of ZFS. Until Oracle gets their act together, and releases the current sources of ZFS, crypto is not implemented.
60
61 Quick post on installing ZFS as a kernel module, not FUSE, on Debian GNU/Linux. The documents already exist for getting this going, I'm just hoping to spread this to a larger audience, in case you are unaware that it exists.
62
63 First, the [[Lawrence Livermore National Laboratory>>https://www.llnl.gov/]] has been working on porting the native Solaris ZFS source to the Linux kernel as a kernel module. So long as the project remains under contract by the Department of Defense in the United States, I'm confident there will be continuous updates. You can track the progress of that porting at http://zfsonlinux.org.
64
65 **UPDATE (May 05, 2013)**: I've updated the installation instructions. The old instructions included downloading the source and installing from there. At the time, that was all that was available. Since then, the ZFS on Linux project has created a proper Debian repository that you can use to install ZFS. Here is how you would do that:
66
67 {{code language="bash session"}}
68 $ su -
69 # wget http://archive.zfsonlinux.org/debian/pool/main/z/zfsonlinux/zfsonlinux_2%7Ewheezy_all.deb
70 # dpkg -i zfsonlinux_2~wheezy_all.deb
71 # apt-get update
72 # apt-get install debian-zfs
73 {{/code}}
74
75 And that's it!
76
77 If you're running Ubuntu, which I know most of you are, you can install the packages from the Launchpad PPA [[https:~~/~~/launchpad.net/~~~~zfs-native>>url:https://web.archive.org/web/20210605031658/https://launchpad.net/~~zfs-native]].
78
79 **UPDATE (May 05, 2013)**: The following instructions may not be relevant for fixing the manpages. If they are, I've left them in this post, just struck out.
80
81 --**A word of note:** the manpages get installed to /share/man/. I found this troubling. You can modify your $MANPATH variable to include /share/man/man8/, or by creating symlinks, which is the approach I took:--
82
83 --{{{# cd /usr/share/man/man8/ # ln -s /share/man/man8/zdb.8 zdb.8 # ln -s /share/man/man8/zfs.8 zfs.8 # ln -s /share/man/man8/zpool.8 zpool.8 }}}---
84
85 Now, make your zpool, and start playing:
86
87 {{code language="bash session"}}
88 $ sudo zpool create test raidz sdd sde sdf sdg sdh sdi
89 {{/code}}
90
91 It is stable enough to run a ZFS root filesystem on a GNU/Linux installation for your workstation as something to play around with. It is copy-on-write, supports compression, deduplication, file atomicity, off-disk caching, --encryption,-- and much more. At this point, unfortunately, I'm convinced that ZFS as a Linux kernel module will become "stable" long before Btrfs will be stable in the mainline kernel. Either way, it doesn't matter to me. Both are Free Software, and both provide the long needed features we've needed with today's storage needs. Competition is healthy, and I love having choice. Right now, that choice might just be ZFS.
92
93 ----
94
95 (% style="text-align: center;" %)
96 Posted by Aaron Toponce on Tuesday, April 17, 2012, at 2:10 pm.
97 Filed under [[Debian>>url:https://web.archive.org/web/20210605031658/https://pthree.org/category/debian/]], [[Linux>>url:https://web.archive.org/web/20210605031658/https://pthree.org/category/linux/]], [[Ubuntu>>url:https://web.archive.org/web/20210605031658/https://pthree.org/category/ubuntu/]], [[ZFS>>url:https://web.archive.org/web/20210605031658/https://pthree.org/category/zfs/]].
98 Follow any responses to this post with its [[comments RSS>>url:https://web.archive.org/web/20210605031658/https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/feed/]] feed.
99 You can [[post a comment>>url:https://web.archive.org/web/20210605031658/https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/#respond]] or [[trackback>>url:https://web.archive.org/web/20210605031658/https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/trackback/]] from your blog.
100 For IM, Email or Microblogs, here is the [[Shortlink>>url:https://web.archive.org/web/20210605031658/https://pthree.org/?p=2357]].
101
102 ----
103
104 {{box title="**Archived From:**"}}
105 [[https:~~/~~/web.archive.org/web/20210605031658/https:~~/~~/pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/>>https://web.archive.org/web/20210605031658/https://pthree.org/2012/04/17/install-zfs-on-debian-gnulinux/]]
106 {{/box}}