feat(lvm disk detection): add support to detect disks used by LVM localpv#619
feat(lvm disk detection): add support to detect disks used by LVM localpv#619Ab-hishek wants to merge 2 commits intoopenebs-archive:developfrom
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.
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.
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.
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?
akhilerm
left a comment
There was a problem hiding this comment.
@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-localpvduring 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>