-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zpool import progress reports for long imports
When an import requires a long MMP activity check, or when the user requests pool recovery, the import make take a long time. The user may not know why, or be able to tell whether the import is progressing or is hung. Add a new option to "zpool import", "-v" (for verbose). When the -v option is used, create an additional thread which periodically checks the contents of kstat/zfs/import_progress. If the import does not finish quickly, it reports the following on stdout: * Name and guid of pool being imported * User-friendly version of spa_load_state * Expected time import will complete * the max txg if recovering the pool If one or more of these values change, the thread prints a new record. A new record will be printed to stdout with a maximum frequency of one per second so as not to spam the user. As a result the printed output may reflect only some of the import states transitioned through. Use import kstat to check for Multihost activity check in relevant tests, instead of using import duration, which works poorly when testing on a slow machine. Sample output: Pool tank1 (guid 4591991398949870326): Checking for a remote import. Check will complete by Tue Apr 16 08:43:58 2019 Pool tank1 (guid 4591991398949870326): Checking for a remote import. Check will complete by Tue Apr 16 08:44:43 2019 Recovering Pool max txg 745 Signed-off-by: Olaf Faaland <faaland1@llnl.gov>
- Loading branch information
Showing
3 changed files
with
205 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters