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

Multipath Support #59

Open
TProhofsky opened this issue Jun 8, 2020 · 2 comments
Open

Multipath Support #59

TProhofsky opened this issue Jun 8, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@TProhofsky
Copy link
Collaborator

Dual port SAS will be enumerated as 2 SCSI device and 2 block devices for a given drive. The lockmgr should use any available path for failover

@Leo-Yan
Copy link
Contributor

Leo-Yan commented Jun 10, 2020

Let's divide into two parts:

  • The first part is using IDM lock manager to handle multipath for generating device list, e.g. in below case, the client passes 8 devices:
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sda1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdb1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdc1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdd1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sde1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdf1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdg1
2020-06-10 11:15:53 52367 [8690]: blk_dev /dev/sdh1

Actually, these 8 device paths only refer to 4 drives, so there have 4 pairs (4x2) which share the same drive. For this case, IDM lock manager will parse the drive block name and convert it to SCSI generic node (/dev/sgX) and then using partition table UUID for analysis the duplicated paths, so finally we can get below result:

2020-06-10 11:15:53 52367 [8690]: Sorted drives:
2020-06-10 11:15:53 52367 [8690]: Drive[0] is /dev/sg2
2020-06-10 11:15:53 52367 [8690]: Drive UUID: 31ef677b-2c4e-414b-9bf8-adc12f0bcff9
2020-06-10 11:15:53 52367 [8690]: Drive[1] is /dev/sg3
2020-06-10 11:15:53 52367 [8690]: Drive UUID: a0d7e838-18cf-4b92-a631-b67b125da218
2020-06-10 11:15:53 52367 [8690]: Drive[2] is /dev/sg4
2020-06-10 11:15:53 52367 [8690]: Drive UUID: c94b885a-fc7c-4254-b093-02e56b0ea1ee
2020-06-10 11:15:53 52367 [8690]: Drive[3] is /dev/sg5
2020-06-10 11:15:53 52367 [8690]: Drive UUID: cd1275ac-0b85-47e6-a1f9-98c223164491

The patches have been merged: #62

  • The second part is how to using the existed multipath info to improve the drive failure handling, if one path has failed, we can iterate multipath and try to select another path as backup to send SCSI command. For this part, let's defer it (TBD).

@Leo-Yan Leo-Yan added the enhancement New feature or request label Jul 2, 2020
@Leo-Yan
Copy link
Contributor

Leo-Yan commented Feb 22, 2021

Have merged PR #120 to support multi-paths.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants