- 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.2 Creating a Dynamic Stripe
A dynamic stripe is the most basic pool that can be created. There is no redundancy in this configuration. If any disk fails, then the whole pool is lost. Any pool created with multiple vdevs will dynamically stripe across each vdev or physical device.
You can use the zpool command with the subcommand to create a dynamic stripe. After the create subcommand is the name of the new ZFS pool, dstripe, and the disks that will comprise the pool.
# zpool create dstripe c5t0d0 c5t1d0
The following listing presents the results of creating the ZFS pool dstripe. On line 2, zpool list is executed to list all the ZFS pools on the system. Line 3 starts a list of the available pools. The command gives you general information about the ZFS pools.
1 # zpool create dstripe c5t0d0 c5t1d0 2 # zpool list 3 NAME SIZE USED AVAIL CAP HEALTH ALTROOT 4 dstripe 234M 75K 234M 0% ONLINE - 5 rpool 15.9G 3.21G 12.7G 20% ONLINE -
Next on line 6, zpool status is issued to inquire about the status of the ZFS pools. Starting at line 7, the status of the ZFS pool dstripe is displayed, with a normal status. Reading the config: section of the output starting at line 10, the pool dstripe is shown as two concatenated disks. Lines 14 and 15 list the vdevs (c5t0d0 and c5t1d0) that belong to the pool dstripe. The second pool listed is made of a single disk called rpool, configured as a dynamic stripe with only a single vdev (c3d0s0). It was created as part of the OS installation process.
6 # zpool status 7 pool: dstripe 8 state: ONLINE 9 scrub: none requested 10 config: 11 12 NAME STATE READ WRITE CKSUM 13 dstripe ONLINE 0 0 0 14 c5t0d0 ONLINE 0 0 0 15 c5t1d0 ONLINE 0 0 0 16 17 errors: No known data errors 18 19 pool: rpool 20 state: ONLINE 21 scrub: none requested 22 config: 23 24 NAME STATE READ WRITE CKSUM 25 rpool ONLINE 0 0 0 26 c3d0s0 ONLINE 0 0 0 27 28 errors: No known data errors
Figure 2.1 illustrates the resulting dynamic pool with its two vdevs of single nonredundant disks. Any problems with the disks (sector errors or disk failure) may result in the loss of the whole pool or data.
Figure 2.1 Dynamic stripe pool with two vdevs