Fix a bug where resilver is not started automatically on pool import or load.
If disk was missing on pool load or import and on next pool load or import it was present, resilver wasn't started automatically and ZFS reported all disks as ONLINE and healthy. Then, when another disk died, pool became unaccessible, because if it was 2-way mirror or RAIDZ1 two vdevs were out of sync. To fix the problem, start resilver automatically on pool load or import. Obtained from: OpenSolaris MFC after: 3 days
This commit is contained in:
parent
b1c7417cd8
commit
510ec358c5
@ -1425,6 +1425,12 @@ spa_load(spa_t *spa, nvlist_t *config, spa_load_state_t state, int mosconfig)
|
||||
*/
|
||||
if (need_update)
|
||||
spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE);
|
||||
|
||||
/*
|
||||
* Check all DTLs to see if anything needs resilvering.
|
||||
*/
|
||||
if (vdev_resilver_needed(rvd, NULL, NULL))
|
||||
spa_async_request(spa, SPA_ASYNC_RESILVER);
|
||||
}
|
||||
|
||||
error = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user