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

Add forceNVME flag #134

Merged
merged 1 commit into from
Feb 14, 2024
Merged

Add forceNVME flag #134

merged 1 commit into from
Feb 14, 2024

Conversation

ixhamza
Copy link
Contributor

@ixhamza ixhamza commented Feb 14, 2024

NVMe devices are detected through the nvme prefix, which can be unreliable and require explicit specification. For one of our use cases, we have nvme ioctl compatible devices show up under names outside of /dev/nvme* .The ability to override disk type is already available for ata and scsi within openseachest. smartctl also has an option to force the NVMe protocol using smartctl -d nvme /dev/sdX, so it would be nice to have the same flag for NVMe devices in openSeaChest, similar to other protocols.

NVMe devices are detected through the `nvme` prefix, which can be
unreliable and require explicit specification. This PR adds forceNVME
flag to force NVMe protocol to communicate with the backend device.

Signed-off-by: Ameer Hamza <[email protected]>
@vonericsen
Copy link
Contributor

Hi @ixhamza,

Thanks for this pull request!
This seems reasonable to add, but will review it more in depth today.

Are you able to tell me more about the hardware or system configuration that causes these devices to show up under /dev/sdX (or whatever the handle is)?
We try to support auto-detection of something like this so that the users don't need to manually add this flag unless autodetection failed for some reason to keep things as easy as possible.
If I can get some more information about this configuration or how to create a similar test scenario internally, I will also look into auto-detecting when this is happening in a system.

@vonericsen vonericsen self-assigned this Feb 14, 2024
@ixhamza
Copy link
Contributor Author

ixhamza commented Feb 14, 2024

Hello @vonericsen,

The NVMe device in question is connected to a trimode HBA, resulting in NVMe appearing as a SCSI LUN. We are utilizing the SCSI Host ioctl interface to directly send NVMe encapsulated commands to the firmware through a specially modified hba driver. This enables user space monitoring tools to send NVMe commands to the disk. Auto-detection would not be helpful here, as the disk can be accessed either through SCSI commands or NVMe commands.

@vonericsen vonericsen merged commit 3d1763a into Seagate:develop Feb 14, 2024
27 checks passed
@vonericsen
Copy link
Contributor

@ixhamza,

Thank you for the additional information!
That is a really interesting configuration I had not heard of before.

If at any point you think having some auto-detection would be helpful in this setup we can work on something at that time. I've handled similar situations in the past where it can be good to pass either set of commands to the device and that is similar to how the SATA support in our tool works today.

I've gone ahead and merged this to our develop branch since it all looked good from my perspective. Thanks again!

@ixhamza ixhamza deleted the NAS-127349 branch February 14, 2024 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants