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 vinum volume/raid support #41

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Add vinum volume/raid support #41

merged 1 commit into from
Nov 5, 2024

Conversation

pyrco
Copy link
Contributor

@pyrco pyrco commented Oct 21, 2024

No description provided.

@pyrco pyrco requested a review from Schamper October 21, 2024 14:48
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 97.28395% with 11 lines in your changes missing coverage. Please review.

Project coverage is 76.70%. Comparing base (18f600f) to head (e1c21b9).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
dissect/volume/vinum/vinum.py 92.99% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   72.29%   76.70%   +4.40%     
==========================================
  Files          26       29       +3     
  Lines        1960     2365     +405     
==========================================
+ Hits         1417     1814     +397     
- Misses        543      551       +8     
Flag Coverage Δ
unittests 76.70% <97.28%> (+4.40%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/config.py Show resolved Hide resolved
dissect/volume/vinum/config.py Show resolved Hide resolved
dissect/volume/vinum/config.py Show resolved Hide resolved
@pyrco pyrco force-pushed the add-vinum-support branch 2 times, most recently from 3816c17 to 204f045 Compare October 22, 2024 08:12
@pyrco pyrco requested a review from Schamper October 22, 2024 08:12
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/c_vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/config.py Outdated Show resolved Hide resolved
dissect/volume/vinum/config.py Outdated Show resolved Hide resolved
dissect/volume/vinum/config.py Outdated Show resolved Hide resolved
dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
@pyrco pyrco force-pushed the add-vinum-support branch from 204f045 to 1d156d3 Compare October 24, 2024 10:58
@pyrco pyrco requested a review from Schamper October 24, 2024 10:58
of multiple belonging to the same RAID set.
"""

def __init__(self, fh: list[VinumPhysicalDiskDescriptor] | VinumPhysicalDiskDescriptor):
Copy link
Member

Choose a reason for hiding this comment

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

fh can also be a BinaryIO I think?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it can be. VinumPhysicalDiskDescriptor is currently defined as BinaryIO | "VinumPhysicalDisk".

else:
log.warning("Plex %r has an unknown organistaion, ignoring plex", plex.name)
else:
log.warning("Plex %r is down, ignoring plex", plex.name)
Copy link
Member

Choose a reason for hiding this comment

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

What does it mean when a plex is "down"? In the case of Dissect, would it not still be interesting to "open" "down" plexes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure how "broken" Plexes are that are down. If we do try to use them it could especially interfere with mirrored sets where one of the mirrors is still up/correct.

class Vinum(RAID):
"""Read a Vinum RAID set of one or multiple devices/file-like objects.

Use this class to read from a RAID set.
Copy link
Member

Choose a reason for hiding this comment

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

Can you use this docstring to shortly explain what all the nomenclature means? E.g. what's a plex, what's a "SD", or organisation?

This is probably the most relevant/easily findable class to do it in.

dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
dissect/volume/vinum/vinum.py Outdated Show resolved Hide resolved
@pyrco pyrco force-pushed the add-vinum-support branch from 1d156d3 to e1c21b9 Compare November 4, 2024 15:03
@pyrco pyrco requested a review from Schamper November 4, 2024 15:04
@pyrco pyrco merged commit dd3b289 into main Nov 5, 2024
20 checks passed
@pyrco pyrco deleted the add-vinum-support branch November 5, 2024 06:51
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.

2 participants