You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stevendanna opened this issue
Feb 26, 2021
· 2 comments
Labels
A-storageRelating to our storage engine (Pebble) on-disk storage.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Unfortunately, on Linux, I believe that the frsize field should be preferred over bsize when calculating total sizes from statfs output. While counterintuitive based on their plain-language descriptions, the authors of GNU coreutils and gnulib seem to agree. The issue here: cockroachdb/pebble#1072 provides an example of the potential problem.
This is also potentially a problem with the capacity calculations that power the capacity timeseries metric (and rebalancing decisions). Currently, we use the github.com/elastic/gosigar module for this purpose:
stevendanna
changed the title
Possibly incorrect use of Bsize instead of Frsize in sysutil.StatFS
storage: possibly incorrect use of Bsize instead of Frsize in sysutil.StatFS
Sep 1, 2021
We have marked this issue as stale because it has been inactive for
18 months. If this issue is still relevant, removing the stale label
or adding a comment will keep it active. Otherwise, we'll close it in
10 days to keep the issue queue tidy. Thank you for your contribution
to CockroachDB!
A-storageRelating to our storage engine (Pebble) on-disk storage.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Describe the problem
In sysutil.StatFS we return the Bsize field as the "BlockSize":
cockroach/pkg/util/sysutil/sysutil_unix.go
Line 52 in dac79a2
cockroach/pkg/cli/debug.go
Line 243 in dac79a2
Unfortunately, on Linux, I believe that the frsize field should be preferred over bsize when calculating total sizes from statfs output. While counterintuitive based on their plain-language descriptions, the authors of GNU coreutils and gnulib seem to agree. The issue here: cockroachdb/pebble#1072 provides an example of the potential problem.
Jira issue: CRDB-3055
The text was updated successfully, but these errors were encountered: