How to recover a destroyed zfs storage pool in solaris?
-
# zpool destroy test_pool # zpool import -D pool: test_pool id: 12011639382434161971 state: ONLINE (DESTROYED) action: The pool can be imported using its name or numeric identifier. config: test_pool ONLINE c2t2d0 ONLINE # zpool import -D test_pool # zpool status test_pool pool: test_pool state: ONLINE scrub: none requested config: NAME STATE READ WRITE CKSUM test_pool ONLINE 0 0 0 c2t2d0 ONLINE 0 0 0 errors: No known data errors If one of the devices in the destroyed pool is either unavailable or faulted, you might be able to recover the destroyed pool with the -f option: # zpool destroy test_pool1 # zpool import -D pool: test_pool1 id: state: DEGRADED (DESTROYED) status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using ’zpool online’. see: http://www.sun.com/msg/ZFS-8000-2Q scrub: resilver completed after 0h0m with 0 errors on Thu Jun 02 17:27:05 2010 config: NAME STATE READ WRITE CKSUM test_pool1 DEGRADED 0 0 0 raidz2 DEGRADED 0 0 0 c3t8d0 ONLINE 0 0 0 c3t9d0 ONLINE 0 0 0 c3t10d0 ONLINE 0 0 0 c3t11d0 UNAVAIL 0 35 1 cannot open c3t12d0 ONLINE 0 0 0 errors: No known data errors # zpool import -Df test_pool1 # zpool status -x pool: test_pool1 state: DEGRADED status: One or more devices could not be opened. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Attach the missing device and online it using ’zpool online’. see: http://www.sun.com/msg/ZFS-8000-2Q scrub: resilver completed after 0h0m with 0 errors on Thu Jun 02 17:27:05 2010 config: NAME STATE READ WRITE CKSUM test_pool1 DEGRADED 0 0 0 raidz2 DEGRADED 0 0 0 c3t8d0 ONLINE 0 0 0 c3t9d0 ONLINE 0 0 0 c3t10d0 ONLINE 0 0 0 c3t11d0 UNAVAIL 0 37 0 cannot open c3t12d0 ONLINE 0 0 0 errors: No known data errors # zpool online test_pool1 c3t11d0 Bringing device c3t11d0 online # zpool status -x all pools are healthy
© Lightnetics 2024