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

From version 2.1
edited by Drunk Monkey
on 2024-09-01 08:28
Change comment: There is no comment for this version
To version 4.3
edited by Drunk Monkey
on 2024-09-01 08:54
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -ZFS Administration Part I VDEVs
1 +ZFS Administration - Part I - VDEVs
Content
... ... @@ -37,14 +37,17 @@
37 37  
38 38  Let's start by creating a simple zpool wyth my 4 drives. I could create a zpool named "tank" with the following command:
39 39  
40 -{{{# zpool create tank sde sdf sdg sdh}}}
40 +{{code language="bash session"}}
41 +# zpool create tank sde sdf sdg sdh
42 +{{/code}}
41 41  
42 42  In this case, I'm using four disk VDEVs. Notice that I'm not using full device paths, although I could. Because VDEVs are always dynamically striped, this is effectively a RAID-0 between four drives (no redundancy). We should also check the status of the zpool:
43 43  
44 -{{{# zpool status tank
46 +{{code language="bash session"}}
47 +# zpool status tank
45 45   pool: tank
46 46   state: ONLINE
47 - scan: none requested
50 + scan: none requested
48 48  config:
49 49  
50 50   NAME STATE READ WRITE CKSUM
... ... @@ -54,21 +54,26 @@
54 54   sdg ONLINE 0 0 0
55 55   sdh ONLINE 0 0 0
56 56  
57 -errors: No known data errors}}}
60 +errors: No known data errors
61 +{{/code}}
58 58  
59 59  Let's tear down the zpool, and create a new one. Run the following before continuing, if you're following along in your own terminal:
60 60  
61 -{{{# zpool destroy tank}}}
65 +{{code language="bash session"}}
66 +# zpool destroy tank
67 +{{/code}}
62 62  
69 +
63 63  == A simple mirrored zpool ==
64 64  
65 65  In this next example, I wish to mirror all four drives (/dev/sde, /dev/sdf, /dev/sdg and /dev/sdh). So, rather than using the disk VDEV, I'll be using "mirror". The command is as follows:
66 66  
67 -{{{# zpool create tank mirror sde sdf sdg sdh
74 +{{code language="bash session"}}
75 +# zpool create tank mirror sde sdf sdg sdh
68 68  # zpool status tank
69 69   pool: tank
70 70   state: ONLINE
71 - scan: none requested
79 + scan: none requested
72 72  config:
73 73  
74 74   NAME STATE READ WRITE CKSUM
... ... @@ -79,7 +79,8 @@
79 79   sdg ONLINE 0 0 0
80 80   sdh ONLINE 0 0 0
81 81  
82 -errors: No known data errors}}}
90 +errors: No known data errors
91 +{{/code}}
83 83  
84 84  Notice that "mirror-0" is now the VDEV, with each physical device managed by it. As mentioned earlier, this would be analogous to a Linux software RAID "/dev/md0" device representing the four physical devices. Let's now clean up our pool, and create another.
85 85  
... ... @@ -217,6 +217,7 @@
217 217  This should act as a good starting point for getting the basic understanding of zpools and VDEVs. The rest of it is all downhill from here. You've made it over the "big hurdle" of understanding how ZFS handles pooled storage. We still need to cover RAIDZ levels, and we still need to go into more depth about log and cache devices, as well as pool settings, such as deduplication and compression, but all of these will be handled in separate posts. Then we can get into ZFS filesystem datasets, their settings, and advantages and disagvantages. But, you now have a head start on the core part of ZFS pools.
218 218  
219 219  ----
229 +
220 220  (% style="text-align: center;" %)
221 221  Posted by Aaron Toponce on Tuesday, December 4, 2012, at 6:00 am.
222 222  Filed under [[Debian>>url:https://web.archive.org/web/20210430213532/https://pthree.org/category/debian/]], [[Linux>>url:https://web.archive.org/web/20210430213532/https://pthree.org/category/linux/]], [[Ubuntu>>url:https://web.archive.org/web/20210430213532/https://pthree.org/category/ubuntu/]], [[ZFS>>url:https://web.archive.org/web/20210430213532/https://pthree.org/category/zfs/]].
... ... @@ -223,8 +223,9 @@
223 223  Follow any responses to this post with its [[comments RSS>>url:https://web.archive.org/web/20210430213532/https://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/feed/]] feed.
224 224  You can [[post a comment>>url:https://web.archive.org/web/20210430213532/https://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/#respond]] or [[trackback>>url:https://web.archive.org/web/20210430213532/https://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/trackback/]] from your blog.
225 225  For IM, Email or Microblogs, here is the [[Shortlink>>url:https://web.archive.org/web/20210430213532/https://pthree.org/?p=2584]].
236 +
226 226  ----
227 227  
228 -{{info}}
229 -Retrieved from [[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/]]
230 -{{/info}}
239 +{{box title="**Archived From:**"}}
240 +[[https:~~/~~/web.archive.org/web/20210430213532/https:~~/~~/pthree.org/2012/12/04/zfs-administration-part-i-vdevs/>>https://web.archive.org/web/20210430213532/https://pthree.org/2012/12/04/zfs-administration-part-i-vdevs/]]
241 +{{/box}}