Skip to content

Commit

Permalink
always show rear nvme on m-series (#13964)
Browse files Browse the repository at this point in the history
  • Loading branch information
yocalebo authored Jul 2, 2024
1 parent 606061e commit d9c8bb6
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middlewared/middlewared/plugins/enclosure_/nvme2.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,12 @@ def map_nvme(dmi):
# all nvme systems which we need to handle separately
return map_r30_or_fseries(model, ctx)
elif model in (
ControllerModels.M30.value,
ControllerModels.M40.value,
ControllerModels.M50.value,
ControllerModels.M60.value,
ControllerModels.R50BM.value,
):
# M50, M60 and R50BM use same plx nvme bridge
return map_plx_nvme(model, ctx)
else:
return []
19 changes: 19 additions & 0 deletions src/middlewared/middlewared/plugins/enclosure_/slot_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def get_nvme_slot_info(model):
ControllerModels.F60.value,
ControllerModels.F100.value,
ControllerModels.F130.value,
ControllerModels.M30.value,
ControllerModels.M40.value,
ControllerModels.M50.value,
ControllerModels.M60.value,
ControllerModels.R30.value,
Expand All @@ -68,6 +70,23 @@ def get_nvme_slot_info(model):
i: {SYSFS_SLOT_KEY: i, MAPPED_SLOT_KEY: i, SUPPORTS_IDENTIFY_KEY: True}
for i in range(1, 25)
},
# ALL m-series platforms have 4 rear nvme drive bays.
# The R50BM platform does as well and uses same plx
# nvme bridge. HOWEVER, the m30 and the gen1/2 m40's do
# NOT have the pcie switch that connects those 4 drive
# bays but the gen3 M40 with 192GB RAM does. Since we
# don't have (at time of writing) a proper way to track
# generational m40's, we will always return 4 nvme drive
# bays for all m-series platforms and they will be empty
# on the platforms that can't physically support these drives
'm30_nvme_enclosure': {
i: {SYSFS_SLOT_KEY: i, MAPPED_SLOT_KEY: j, SUPPORTS_IDENTIFY_KEY: False}
for i, j in zip(range(1, 5), range(25, 29))
},
'm40_nvme_enclosure': {
i: {SYSFS_SLOT_KEY: i, MAPPED_SLOT_KEY: j, SUPPORTS_IDENTIFY_KEY: False}
for i, j in zip(range(1, 5), range(25, 29))
},
'm50_nvme_enclosure': {
i: {SYSFS_SLOT_KEY: i, MAPPED_SLOT_KEY: j, SUPPORTS_IDENTIFY_KEY: False}
for i, j in zip(range(1, 5), range(25, 29))
Expand Down

0 comments on commit d9c8bb6

Please sign in to comment.