-
Notifications
You must be signed in to change notification settings - Fork 915
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
cmd/fsck: add repair
option to repair broken directories
#2654
Conversation
Kudos, SonarCloud Quality Gate passed!
|
$ juicefs fsck redis://localhost`, | ||
$ juicefs fsck redis://localhost | ||
|
||
# Repair broken directories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it could be a file
// missing attribute | ||
p := "/" + path.Join(ps[:i+1]...) | ||
if attr.Typ != TypeDirectory { // TODO: determine file size? | ||
logger.Errorf("Path %s (inode %d type %d) cannot be auto-repaired, you have to repair it manually or remove it", p, inode, attr.Typ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
calculate the size based on chunks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for directories. we can fix files with another PR.
Sure. |
No description provided.