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

osd: enumerate device names in a simple way #18453

Merged
merged 5 commits into from Nov 1, 2017

Conversation

Projects
None yet
2 participants
@liewegas
Copy link
Member

commented Oct 20, 2017

This adds a 'devices' metadata key that is a comma-separated list of device names (e.g., "sdc", "dm-1", "nvme0n1"). If there is a dm device in there, we also include all of the parent/consituent devices that it is built out of. For example, for my simple LV, I get

"devices": "dm-3,sdc",

This will simplify the mgr's efforts to correlate devices and osds. It will also be useful for the OSD code that queries SMART info.

What it doesn't do is distinguish between "primary" and "secondary" devices. So if you have a shared SSD with journals on it, all OSDs using it will include it in their list.

TODO:

  • implement for FileStore
  • add a primary_device key too?
@jcsp

jcsp approved these changes Oct 31, 2017

Copy link
Contributor

left a comment

Seems reasonable! I haven't read the LVM/DM code enough to know how strongly it guarantees to give you all the right links in /dev

@jcsp

This comment has been minimized.

Copy link
Contributor

commented Oct 31, 2017

(does need a rebase too)

liewegas added some commits Oct 20, 2017

os/ObjectStore: add get_devices() method
The intent here is to return the set of hardware storage devices, as
identified by the "devname" (i.e., the directory name for the device in
/sys/block/).  For example, "sda", "nvme0n1", etc.

Signed-off-by: Sage Weil <sage@redhat.com>
os/bluestore/BlockDevice: add get_devname(), get_devices()
Enumerate device(s) that we are backed by.  It may be plural because of
DM, which might mask an underlying device, or because the dm device is
combining multiple other devices.

Signed-off-by: Sage Weil <sage@redhat.com>
osd: return rolled-up 'devices' list as part of metadata
Signed-off-by: Sage Weil <sage@redhat.com>
os/bluestore: implement get_devices()
Signed-off-by: Sage Weil <sage@redhat.com>
os/filestore: implement get_devices()
Signed-off-by: Sage Weil <sage@redhat.com>

@liewegas liewegas force-pushed the liewegas:wip-osd-devs branch from 86efd70 to e90eef1 Oct 31, 2017

@liewegas liewegas merged commit 1df0acc into ceph:master Nov 1, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@liewegas liewegas deleted the liewegas:wip-osd-devs branch Nov 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.