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

add verify command #20

Merged

Conversation

mikemccracken
Copy link
Contributor

@mikemccracken mikemccracken commented Sep 27, 2024

add a command to check if any underlying devices of an atomfs mountpoint have had any corruption detected by dm-verity:

$ sudo ../atomfs/bin/atomfs verify happymountpoint/
/dev/mapper/50bd5ba895c5648b03f596a0d6b3e6ba3c0046f67f1339e22306670d418ab0de-verity: OK
/dev/mapper/36bbe7fcd9d59214ccfed627a24ef27ee3dc884b8adaecf63bab3a6d23a38c97-verity: OK
/dev/mapper/ff6f0586075905d3b0c4edfe4cb3cab63143767df4acf824b1fb318933260741-verity: OK
$ sudo ../atomfs/bin/atomfs verify shamefulmountpoint/
/dev/mapper/4c798c57305b4a14d1959295ebcdd10c290cb48c7675b78556b711d83cf600ac-verity: CORRUPTION FOUND
/dev/mapper/024eea02b94f8424a34bab308aa6471fd37e9f81fa315e9205024f672bc79b20-verity: OK
Error: Found corrupt devices in molecule

Closes #19

This comment was marked as outdated.

uses the dm_status target to check each mounted device for corruption.
outputs status of each atom and returns nonzero if any are bad.

Signed-off-by: Michael McCracken <[email protected]>
@mikemccracken mikemccracken force-pushed the 2024.09.26/main/add-verifycmd branch from 11db025 to 154fa21 Compare September 30, 2024 18:42
@mikemccracken mikemccracken marked this pull request as ready for review September 30, 2024 18:44
@mikemccracken mikemccracken changed the title add verify command (stacked on #18 for now) add verify command Sep 30, 2024
@mikemccracken
Copy link
Contributor Author

rebased this so it's just the one commit now.

Not sure what codecov is doing, this adds a whole file and codecov says it doesn't affect coverage?

@hallyn hallyn merged commit 841e0c2 into project-machine:main Oct 1, 2024
5 checks passed
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.

Add a "verify" command to run against a mountpoint to see if any corruption has been detected by verity
2 participants