ZPOOL
Storage Pool (ZPOOL)
- One or more VDEV
Adding
sudo zpool add mypool /dev/ada3- This increases the storage capacity of the pool by adding /dev/ada3. It is important to note that adding devices to a pool is a permanent operation. Devices added to the pool cannot be removed unless specific configurations, such as mirrored VDEVs, are used.
Replacing
- Can increase capacity
# after physically replacing failed device
sudo zpool replace mypool /dev/ada1 /dev/ada4Removing
- Depends on the architecture
sudo zpool remove mypool /dev/ada3
sudo zpool status mypool
  pool: mypool
 state: ONLINE
  scan: none requested
config:
        NAME        STATE     READ WRITE CKSUM
        mypool      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada1    ONLINE       0     0     0
            ada2    ONLINE       0     0     0
errors: No known data errorsStatus
sudo zpool status mypool
  pool: mypool
 state: ONLINE
  scan: resilvered 2.10G in 0h3m with 0 errors on Sun Sep  5 12:49:01 2024
config:
        NAME        STATE     READ WRITE CKSUM
        mypool      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada1    ONLINE       0     0     0
            ada3    ONLINE       0     0     0
errors: No known data errors
# space usage etc
sudo zpool list mypoolScrub
- Check data integrity
- Do periodically- Every few weeks for active datasets
 
sudo zpool scrub mypoolClearing Errors
- After transient failure
sudo zpool clear mypool /dev/ada2Destroy
sudo zpool destroy new-poolExport
- Detach from running system
sudo zpool export mypoolImport
sudo zpool import
   pool: mypool
     id: 1234567890123456789
  state: ONLINE
 action: The pool can be imported using its name or numeric identifier.
 config:
        mypool     ONLINE
          mirror-0  ONLINE
            ada1    ONLINE
            ada2    ONLINEsudo zpool import mypool
sudo zpool status
  pool: mypool
 state: ONLINE
  scan: none requested
config:
        NAME        STATE     READ WRITE CKSUM
        mypool      ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada1    ONLINE       0     0     0
            ada2    ONLINE       0     0     0
errors: No known data errors