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
osd: support create osd with metadata partition #13314
Conversation
a98e74f
to
95a99d6
Compare
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.
@travisn By this change, the will be difference in the supported configuration depends on whether metadataDevice is shared by multiple OSDs or not (ref). IMO, it's acceptable and updating the supported configuration is enough. Could you tell me your opinion?
This PR doesn't have a description, so I'm trying to understand from the linked issue... So if the metadataDevice is a partition, we must use lvm prepare
instead of lvm batch
? Then this change seems reasonable.
I would just ask the following for maintainability:
- Tests are needed in the CI
- More comments in the code changes and in the commit description to describe the change.
Oh, I should have explained this PR in detail.
Correct.
Yes, I agree with you. I'm going to comment it later. @microyahoo Please wait for a while to review this. I don't have enough time in this week. |
I will add more detailed description for PR.
If this solution works well I will add unit tests and integration tests.
OK. |
95a99d6
to
1299eee
Compare
1299eee
to
012222b
Compare
@microyahoo Thanks for all the unit tests. I will wait for @satoru-takeuchi to review it and suggest if integration tests are needed. |
yes, integration tests are also needed, I will add it ASAP. Do the integration tests need to be merged together with this PR, or can another PR be merged separately? |
Yes, please add an integration test. |
👌 |
Hi @satoru-takeuchi, @travisn I noticed github ci runner has only one 64G disks except for root disk, my test cases is similar to osd-with-metadata-device, but I have to create a partition from another disk as a metadata device first. How to add one more disk in ci runner? Thanks. https://github.com/rook/rook/actions/runs/7220671504/job/19674086946?pr=13314 + sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 64G 0 disk
└─sda1 8:1 0 64G 0 part
sdb 8:16 0 86G 0 disk
├─sdb1 8:17 0 85.9G 0 part /
├─sdb14 8:30 0 4M 0 part
└─sdb15 8:31 0 106M 0 part /boot/efi |
@microyahoo I'll answer tomorrow or the day after tomorrorw. Please wait for a while. |
@microyahoo You can create OSD on top of loop device if you set |
yes, we can use loop device to create osd, but it will lvm, not partition type, not sure if I understand correctly. I will try it first, thanks. |
I meant using loo device for osd and use a partition in the 64 GiB disk as a metadata device. IIRC, a partition will be created if removing the
to
|
891466c
to
459a6cb
Compare
The review in progress. I'll send a feedback next week. |
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.
I left some comments about integration tests and documents but the review is still under progress. I'll make some other comments about go code later.
I'm reviewing and testing this PR. Please wait for a while. Probably I'll finish the review tomorrow. |
8ecd944
to
97ac157
Compare
test cases failed due to
|
cacd0f4
to
b3c0f3c
Compare
This pull request has merge conflicts that must be resolved before it can be merged. @microyahoo please rebase it. https://rook.io/docs/rook/latest/Contributing/development-flow/#updating-your-fork |
Currently, when rook provisions OSDs(in the OSD prepare job), rook effectively run a c-v command such as the following. ```console ceph-volume lvm batch --prepare <deviceA> <deviceB> <deviceC> --db-devices <metadataDevice> ``` but c-v lvm batch only supports disk and lvm, instead of disk partitions. We can resort to `ceph-volume lvm prepare` to implement it. Signed-off-by: Liang Zheng <zhengliang0901@gmail.com>
Hi @satoru-takeuchi, all test cases passed, PTAL, thanks. |
@travisn I approved this PR. Could you also review this? It's because you left change request to add tests and improve documentation. In my feeling, it doesn't break the existing cluster's behavior and is well tested. Doducments are well updated. |
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.
Looks good with all the testing, thanks.
osd: support create osd with metadata partition (backport #13314)
Which issue is resolved by this Pull Request:
Resolves #13280
Currently, when rook provisions OSDs(in the OSD prepare job), rook effectively run a c-v command such as the following.
ceph-volume lvm batch --prepare <deviceA> <deviceB> <deviceC> --db-devices <metadataDevice>
but
c-v lvm batch
only supports disk and lvm, instead of disk partitions. We can resort toceph-volume lvm prepare
to implement it.Signed-off-by: Liang Zheng zhengliang0901@gmail.com
Checklist: