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

Documentation for minimum resize amount #546

Open
ultimatespirit opened this issue Oct 3, 2024 · 0 comments
Open

Documentation for minimum resize amount #546

ultimatespirit opened this issue Oct 3, 2024 · 0 comments

Comments

@ultimatespirit
Copy link

Looking at the source, and attempting a resize directly, it appears that tomb restricts resizing a tomb to 150MiB increments:

tomb/tomb

Line 2849 in ff69299

_failure "The growth in size must be greater than 150MiB"

This is not reflected in the documentation, and is also a really odd limit. Is there any documentation for why we have such a limit?

Looking at the git blame: 48c08c0

It seems to somehow be related to btrfs, but I am not familiar with any restriction on btrfs's ability to resize arbitrarily that would lend itself to needing a 150MiB minimum. Certainly not finding that at all in its documentation.

Actionable items to consider:

  • At least document the limit and why it exists.
  • Ideally, why not have these cases fall back on creating a new volume encrypted with the same key file of the requested size and copying contents over?
  • If the reason is somehow related to btrfs, detect the filesystem and enforce the limit only for btrfs
  • If there's no hard technical reason from filesystems, consider not having the limit.

P.S. It's very odd that btrfs resizing involves creating a directory under $HOME instead of /run/media/$USER/, which is where tomb open normally seems to go:

tomb/tomb

Line 2894 in ff69299

local mp=$HOME/${TOMBNAME}.tomb.resize

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

No branches or pull requests

1 participant