Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Message(s) Indicating the Progress of An Import #16516

Open
Haravikk opened this issue Sep 8, 2024 · 2 comments
Open

Add Message(s) Indicating the Progress of An Import #16516

Haravikk opened this issue Sep 8, 2024 · 2 comments
Labels
Type: Feature Feature request or new feature

Comments

@Haravikk
Copy link

Haravikk commented Sep 8, 2024

Describe the feature would like to see added to OpenZFS

During a slow pool import, a number of zpool commands can hang until the slow import is completed, with zero feedback to indicate that this is the case.

If possible, I would like to see messages added to indicate why the command is hanging, e.g- "Operation delayed due to import(s): pool1, pool2". And if possible, to indicate the progress of any relevant operation.

For example, if a pool is slow to import because ZFS is running through part of the event log, completing interrupted deletions etc., then it would be great if a percentage could be given (if such a figure is possible to get).

How will this feature improve OpenZFS?

It will make it immediately clear why an operation is stalled, at least in common cases that support is added for. Imports and exports are the big ones I'm aware of, this can stall nearly all zpool commands until they are complete.

Additional context

I recently suffered a power loss (and that discovered my UPS is useless, hooray!) while I had a large write stuck in RAM, so when I was able to start back up again the import took nearly 15 minutes as ZFS presumably had to release everything incomplete that had been written, plus whatever other checks it goes through when interrupted.

But as far as I could tell there was no way to get any feedback about this, as zpool commands just hanged until the import was complete, including importing other pools (though that's on me, I should have known one of the other pools would be fine since it was barely doing anything at the time, and imported that one first).

Of course removing the deadlocks might be nice long term, but I don't know how feasible this is, but if it's possible to spit out even a basic message I think it would help to make clear when a hang is "normal" (or at least expected), and if any more information can be given that'd be fantastic.

@Haravikk Haravikk added the Type: Feature Feature request or new feature label Sep 8, 2024
@robn
Copy link
Member

robn commented Sep 9, 2024

It's not specifically what you asked for, but #15539 added more info about what import is up to. It's available in dbgmsg and the import_progress kstat.

@Haravikk
Copy link
Author

Haravikk commented Sep 9, 2024

It's not specifically what you asked for, but #15539 added more info about what import is up to. It's available in dbgmsg and the import_progress kstat.

Oh I didn't know about that, that's handy the information is available at least.

In that case just a generic message should suffice if an import is in progress, since the message can simply direct a user to the import_progress kstat (or a wiki article about it) if they want more information? This would help with discoverability at least as I had no idea that existed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

2 participants