-
Notifications
You must be signed in to change notification settings - Fork 113
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
feat(lvm disk detection): add support to detect disks used by LVM localpv #619
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Abhishek Agarwal <abhishek.agarwal@mayadata.io>
Codecov Report
@@ Coverage Diff @@
## master #619 +/- ##
==========================================
- Coverage 47.26% 46.36% -0.90%
==========================================
Files 78 78
Lines 3781 3811 +30
==========================================
- Hits 1787 1767 -20
- Misses 1838 1884 +46
- Partials 156 160 +4
Continue to review full report at Codecov.
|
Signed-off-by: Abhishek Agarwal <abhishek.agarwal@mayadata.io>
// checking for lvm localPV | ||
usedByProbe := newUsedByProbe(blockDevice.DevPath) | ||
// check for LVM file system | ||
fstype := usedByProbe.BlkidIdentifier.GetOnDiskFileSystem() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a reliable way to check if the device is in use by LVM localPV. Because nodes having LVM setup will also have the same lvm filesystem on the disks.
we need to check if this method helps us to identify between lvm localPV and LVM that has been setup by user.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This same issue is there for cstor and zfs -localpv. To identify that, we check if the device is exclusively locked. which happens only if kernel zfs is using the disk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because nodes having LVM setup will also have the same lvm filesystem on the disks.
By this you mean, disks that are used manually by LVM utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Ab-hishek Some changes are needed on how to differentiate between disks used by LVM localPV and LVM that has been setup by the user.
Signed-off-by: Abhishek Agarwal abhishek.agarwal@mayadata.io
Why is this PR required? What issue does it fix?:
openebs/openebs#3407
What this PR does?:
This PR adds the functionality to detect disk that are used by lvm-locapv and tag them with
block-device-tag=lvm-localpv
during blockdevice creation.Does this PR require any upgrade changes?:
If the changes in this PR are manually verified, list down the scenarios covered::
TODO: Manual test for the change
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:
<type>(<scope>): <subject>