- 2.1 ZFS Pool Concepts
- 2.2 Creating a Dynamic Stripe
- 2.3 Creating a Pool with Mirrored Devices
- 2.4 Creating a Pool with RAID-Z Devices
- 2.5 Creating a Spare in a Storage Pool
- 2.6 Adding a Spare Vdev to a Second Storage Pool
- 2.7 Replacing Bad Devices Automatically
- 2.8 Locating Disks for Replacement
- 2.9 Example of a Misconfigured Pool
2.6 Adding a Spare Vdev to a Second Storage Pool
As indicated earlier in the chapter, you can share a spare vdev with other pools on the same system. In the following example, the spare vdev (c5t14d0) disk is shared with ZFS pool rzpool. After you add the spare to the rzpool, the spare disk now appears in ZFS pools mpool and rzpool, namely, on lines 16 and 17 and lines 38 and 39.
1 # zpool add rzpool spare c5t14d0 2 # zpool status mpool rzpool 3 pool: mpool 4 state: ONLINE 5 scrub: none requested 6 config: 7 8 NAME STATE READ WRITE CKSUM 9 mpool ONLINE 0 0 0 10 mirror ONLINE 0 0 0 11 c5t2d0 ONLINE 0 0 0 12 c5t3d0 ONLINE 0 0 0 13 mirror ONLINE 0 0 0 14 c5t4d0 ONLINE 0 0 0 15 c5t5d0 ONLINE 0 0 0 16 spares 17 c5t14d0 AVAIL 18 19 errors: No known data errors 20 21 pool: rzpool 22 state: ONLINE 23 scrub: none requested 24 config: 25 26 NAME STATE READ WRITE CKSUM 27 rzpool ONLINE 0 0 0 28 raidz1 ONLINE 0 0 0 29 c5t6d0 ONLINE 0 0 0 30 c5t7d0 ONLINE 0 0 0 31 c5t8d0 ONLINE 0 0 0 32 c5t9d0 ONLINE 0 0 0 33 raidz1 ONLINE 0 0 0 34 c5t10d0 ONLINE 0 0 0 35 c5t11d0 ONLINE 0 0 0 36 c5t12d0 ONLINE 0 0 0 37 c5t13d0 ONLINE 0 0 0 38 spares 39 c5t14d0 AVAIL 40 41 errors: No known data errors |
In Figure 2.6, the spare vdev is shared between the mpool and rzpool ZFS pools. Each pool can use the spare when needed.
Figure 2.6 Pools mpool and rzpool sharing a spare vdev