Changes for page ZFS Administration - Part I - VDEVs
Last modified by Drunk Monkey on 2024-09-01 12:39
From version
4.2


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


edited by Drunk Monkey
on 2024-09-01 08:54
on 2024-09-01 08:54
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- 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