The question: What is resize2fs
's progress bar indicating during "pass 2" of an offline shrink operation on a large (8-28Tb) ext4 filesystem?
The details:
I've done ~5 resize2fs
shrink operations using the -p
("progress") flag and I can't figure out what the "progress bar" for "pass 2" is telling me. Example output included below.
The progress bar starts as all dashes and partially fills with X's, but the number of X's increases and decreases throughout the operation and in every case the operation has completed with the progress bar incomplete. Sometimes the progress bar is partially filled when pass 2 completes, as in the example output below, but in at least one case it completed with no X's ("empty") though there had been X's during the operation. Sometimes the number of X's increases and decreases multiple times throughout the operation; e.g. increasing from 0 to 8 X's, then decreasing back to 0, then increasing to 6, then back to 0, then increasing to 6 and completing.
# resize2fs -M -p /dev/media/media
resize2fs 1.45.4 (23-Sep-2019)
Resizing the filesystem on /dev/media/media to 820975573 (4k) blocks.
Begin pass 2 (max = 369742748)
Relocating blocks XXXXX-----------------------------------
Begin pass 3 (max = 44944)
Scanning inode table XX--------------------------------------
System: PopOS 20.04 (basically Ubuntu 20.04). resize2fs
1.45.4. Let me know if there are other relevant versions for me to include here.
Prior research:
The man page simply refers to "percentage completion":
Prints out a percentage completion bars for each resize2fs operation during an offline resize, so that the user can keep track of what the program is doing.
... but the behavior for phase 2 doesn't fit that description, but the increasing and decreasing seems to suggest it is trying to communicate something.
I have searched Google, ServerFault, and SuperUser for "resize2fs shrink progress bar", "resize2fs progress" and similar queries.
I have found 2 other references to this behavior, but no explanations of what the progress bar is indicating:
- Resize2fs progressbar unreliable post on Ubuntu forums, with no replies.
- In Estimating the time needed for a resize2fs shrink, the asker mentions this behavior in the "Edit" at the end of his question, and in a comment on the top answer by John Mahowald.