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

Option to trim (discard) #8

Open
ijackson opened this issue May 18, 2024 · 2 comments
Open

Option to trim (discard) #8

ijackson opened this issue May 18, 2024 · 2 comments
Labels

Comments

@ijackson
Copy link

Once a a device has been successfully verified with vbig, it is a good idea to "trim" it: that is, tell the SSD it no longer needs to store the verification data. This will improve the performance and lifetime of the device.

Doing this with an option to vbig would be more convenient and less risky than doing it another way: vbig knows precisely what it has just overwritten and knows that it can safely be discarded.

blkdiscard(1) knows how to make the relevant syscall. vbig could call it or make the syscall itself.

@ijackson
Copy link
Author

(Recently I commissioned some new SSDs and forgot to do the trim at the time. When I did it later I chose to use LVM (with devices/issue_discards = 1), since LVM is pretty bulletproof and thereby can help avoid mistakes.)

@ewxrjk ewxrjk added the feature label May 20, 2024
@ewxrjk
Copy link
Owner

ewxrjk commented May 20, 2024

This seems like a good idea. It should be testable using the 'fakestick' nbd driver, since struct nbdkit_plugin has a trim method. https://www.libguestfs.org/nbdkit-plugin.3.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants