-
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.
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 kstat which lists all imports currently being processed by the kernel (currently only one at a time is possible, but the kstat allows for more than one). The kstat is at /proc/spl/kstat/zfs/import_progress. In the zpool utility, create an additional thread which periodically checks the contents of this kstat. If the import does not finish quickly, it reports the following on stderr: * Name and guid of pool being imported * User-friendly version of spa_load_state * spa_load_max_txg If one or more of these values change, the thread prints a new record. A new record will be printed to stderr 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. 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
4 changed files
with
393 additions
and
2 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
Oops, something went wrong.
You might want to explicitly match the strings to the enums, just in case someone adds a new
spa_load_state_t
in the future: