How do I create a zfs storage pool with hot spares in solaris?



  • Designate devices as hot spare when you create the pool:

    # zpool create test_pool mirror c2t1d0 c3t1d0 spare c2t2d0 c3t2d0
    
    # zpool status test_pool
    pool: test_pool
    state: ONLINE
    scrub: none requested
    config:
    NAME STATE READ WRITE CKSUM
    test_pool ONLINE 0 0 0
    mirror ONLINE 0 0 0
    c2t1d0 ONLINE 0 0 0
    c3t1d0 ONLINE 0 0 0
    spares
    c2t2d0 AVAIL
    c3t2d0 AVAIL
    

    Designate devices as hot spare after you have created the pool:

    # zpool add test_pool spare c1t3d0 c2t3d0
    
    # zpool status test_pool
    pool: test_pool
    state: ONLINE
    scrub: none requested
    config:
    NAME STATE READ WRITE CKSUM
    zeepool ONLINE 0 0 0
    mirror ONLINE 0 0 0
    c1t1d0 ONLINE 0 0 0
    c2t1d0 ONLINE 0 0 0
    spares
    c1t3d0 AVAIL
    c2t3d0 AVAIL
    


© Lightnetics 2024