auto zpool recovery import when log device or bad drive blocks import.

Status
Not open for further replies.
Joined
Sep 12, 2013
Messages
37
Please excuse my nu be mistakes while posting.

I have had problems with pools not importing because of a bad zil or l2arc.
I think it would be nifty to have FreeNAS attempt to import the zpool anyway even if the device is bad rather than leave the pool un imported.

Why not have FreeNAS import the pool with zpool import -m tank.
Once the pool is imported FreeNAS remove the bad zil or l2arc.
If the ZIL what ever is stored in the ZIL is lost any way, and I know that performance may tank but at least I would be able to get to my files.

# zpool import -m dozer # zpool status dozer pool: dozer 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 scan: none requested config: NAME STATE READ WRITE CKSUM dozer DEGRADED 0 0 0 mirror-0 ONLINE 0 0 0 c8t0d0 ONLINE 0 0 0 c8t1d0 ONLINE 0 0 0 logs 2189413556875979854 UNAVAIL 0 0 0 errors: No known data errors
After attaching the missing log device, run the zpool clear command to clear the pool errors.
A similar recovery can be attempted with missing mirrored log devices. For example:
# zpool import tank
The devices below are missing, use '-m' to import the pool anyway:
mirror-1 [log]
c3t3d0
c3t4d0

cannot import 'tank': one or more devices is currently unavailable
# zpool import -m tank
# zpool status tank
pool: dozer
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
scan: scrub repaired 0 in 0h0m with 0 errors on Fri Oct 15 16:51:39 2010
config:

NAME STATE READ WRITE CKSUM
dozer DEGRADED 0 0 0
mirror-0 ONLINE 0 0 0
c3t1d0 ONLINE 0 0 0
c3t2d0 ONLINE 0 0 0
logs
mirror-1 UNAVAIL 0 0 0 insufficient replicas
13514061426445294202 UNAVAIL 0 0 0 was c3t3d0
16839344638582008929 UNAVAIL 0 0 0 was c3t4d0
 
Joined
Sep 12, 2013
Messages
37
I posted a feature request for this one as well.

Feature #3174 auto zpool recovery import when log device or bad drive blocks import.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I could be mistaken, but I don't think its possible to ensure your data is completely commited to the pool in the event that your logs are both unavailable during mounting. That's why all the documentation you'll read about slogs says to mirror them. Because if you don't have at least 1 of them online the pool could see significant corruption if the log has data on it.

Assuming I'm correct, there's no chance this will be "fixed" as its not broken. It's performing exactly as designed.
 
Status
Not open for further replies.
Top