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

From version 1.1
edited by Drunk Monkey
on 2024-09-01 09:04
Change comment: There is no comment for this version
To version 1.2
edited by Drunk Monkey
on 2024-09-01 09:06
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -33,7 +33,7 @@
33 33  
34 34  To setup a zpool with RAIDZ-1, we use the "raidz1" VDEV, in this case using only 3 USB drives:
35 35  
36 -{{{# zpool create tank raidz1 sde sdf sdg
36 +{{code language="bash session"}}# zpool create tank raidz1 sde sdf sdg
37 37  # zpool status tank
38 38   pool: pool
39 39   state: ONLINE
... ... @@ -47,11 +47,11 @@
47 47   sdf ONLINE 0 0 0
48 48   sdg ONLINE 0 0 0
49 49  
50 -errors: No known data errors}}}
50 +errors: No known data errors{{/code}}
51 51  
52 52  Cleanup before moving on, if following in your terminal:
53 53  
54 -{{{# zpool destroy tank}}}
54 +{{code language="bash session"}}# zpool destroy tank{{/code}}
55 55  
56 56  === RAIDZ-2 ===
57 57  
... ... @@ -59,7 +59,7 @@
59 59  
60 60  To setup a zpool with RAIDZ-2, we use the "raidz2" VDEV:
61 61  
62 -{{{# zpool create tank raidz2 sde sdf sdg sdh
62 +{{code language="bash session"}}# zpool create tank raidz2 sde sdf sdg sdh
63 63  # zpool status tank
64 64   pool: pool
65 65   state: ONLINE
... ... @@ -74,11 +74,11 @@
74 74   sdg ONLINE 0 0 0
75 75   sdh ONLINE 0 0 0
76 76  
77 -errors: No known data errors}}}
77 +errors: No known data errors{{/code}}
78 78  
79 79  Cleanup before moving on, if following in your terminal:
80 80  
81 -{{{# zpool destroy tank}}}
81 +{{code language="bash session"}}# zpool destroy tank{{/code}}
82 82  
83 83  === RAIDZ-3 ===
84 84  
... ... @@ -86,11 +86,11 @@
86 86  
87 87  To setup a zpool with RAIDZ-3, we use the "raidz3" VDEV:
88 88  
89 -{{{# zpool create tank raidz3 sde sdf sdg sdh sdi
89 +{{code language="bash session"}}# zpool create tank raidz3 sde sdf sdg sdh sdi
90 90  # zpool status tank
91 91   pool: pool
92 92   state: ONLINE
93 - scan: none requested
93 + scan: none requested
94 94  config:
95 95  
96 96   NAME STATE READ WRITE CKSUM
... ... @@ -102,11 +102,11 @@
102 102   sdh ONLINE 0 0 0
103 103   sdi ONLINE 0 0 0
104 104  
105 -errors: No known data errors}}}
105 +errors: No known data errors{{/code}}
106 106  
107 107  Cleanup before moving on, if following in your terminal:
108 108  
109 -{{{# zpool destroy tank}}}
109 +{{code language="bash session"}}# zpool destroy tank{{/code}}
110 110  
111 111  === Hybrid RAIDZ ===
112 112  
... ... @@ -116,11 +116,11 @@
116 116  
117 117  To setup a zpool with 4 RAIDZ-1 VDEVs, we use the "raidz1" VDEV 4 times in our command. Notice that I've added emphasis on when to type "raidz1" in the command for clarity:
118 118  
119 -{{{# zpool create tank raidz1 sde sdf sdg raidz1 sdh sdi sdj raidz1 sdk sdl sdm raidz1 sdn sdo sdp
119 +{{code language="bash session"}}# zpool create tank raidz1 sde sdf sdg raidz1 sdh sdi sdj raidz1 sdk sdl sdm raidz1 sdn sdo sdp
120 120  # zpool status tank
121 121   pool: pool
122 122   state: ONLINE
123 - scan: none requested
123 + scan: none requested
124 124  config:
125 125  
126 126   NAME STATE READ WRITE CKSUM
... ... @@ -142,13 +142,13 @@
142 142   sdo ONLINE 0 0 0
143 143   sdp ONLINE 0 0 0
144 144  
145 -errors: No known data errors}}}
145 +errors: No known data errors{{/code}}
146 146  
147 147  Notice now that there are four RAIDZ-1 VDEVs. As mentioned in a previous post, ZFS stripes across VDEVs. So, this setup is essentially a RAIDZ-1+0. Each RAIDZ-1 VDEV will receive 1/4 of the data sent to the pool, then each striped piece will be further striped across the disks in each VDEV. Nested VDEVs can be a great way to keep performance alive and well, long after the pool has been massively fragmented.
148 148  
149 149  Cleanup before moving on, if following in your terminal:
150 150  
151 -{{{# zpool destroy tank}}}
151 +{{code language="bash session"}}# zpool destroy tank{{/code}}
152 152  
153 153  === Some final thoughts on RAIDZ ===
154 154