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

cmd/utils: log path used when checking disk space #26212

Merged
merged 1 commit into from
Nov 21, 2022

Conversation

kumavis
Copy link
Member

@kumavis kumavis commented Nov 18, 2022

geth may be configured to use various paths across various mounted locations with different disk space availability.
This change additionally logs the path checked when encountering low disk space.

@kumavis
Copy link
Member Author

kumavis commented Nov 18, 2022

seems like geth only monitors the data-dir

go monitorFreeDiskSpace(sigc, stack.InstanceDir(), uint64(minFreeDiskSpace)*1024*1024)

return filepath.Join(c.DataDir, c.name())

progname := strings.TrimSuffix(filepath.Base(os.Args[0]), ".exe")

@kumavis
Copy link
Member Author

kumavis commented Nov 18, 2022

geth should likely monitor and warn for every path its configured to write to

@rjl493456442
Copy link
Member

Actually Geth has two main places for writing:

  • The datadir directory for most of data
  • The ancient directory(it's inside of datadir by default, but can be configured to other path if requested)

We only monitor the first one, might be interesting if we do it for two.

Btw, can you elaborate why you submit this PR? Does something weird happen to you?

Copy link
Contributor

@holiman holiman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@holiman holiman added this to the 1.11.0 milestone Nov 21, 2022
@holiman
Copy link
Contributor

holiman commented Nov 21, 2022

We only monitor the first one, might be interesting if we do it for two.

Agree (but I think this PR is good for now)

@holiman holiman changed the title Improve Low disk space warnings - log path used when checking disk space cmd/utils: log path used when checking disk space Nov 21, 2022
@holiman holiman merged commit 64dccf7 into ethereum:master Nov 21, 2022
shekhirin pushed a commit to shekhirin/go-ethereum that referenced this pull request Jun 6, 2023
This change logs the path checked when encountering low disk space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants