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 udev rules for PureStorage - best practices #729

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ylebris
Copy link

@ylebris ylebris commented Jan 22, 2025

This commit integrates PureStorage-recommended udev rules to optimize queue settings for Citrix XenServer. These changes follow the guidelines outlined in the PureStorage Knowledge Base article #kbid.

Key changes:

  • Implemented udev rules to adjust IO scheduler and queue depth for PureStorage volumes.
  • Ensured compliance with existing XenServer storage management (SM) conventions.
  • Verified functionality through test scenarios to avoid regression with non-PureStorage configurations.

Motivation:
These changes aim to improve performance and reliability for deployments using PureStorage arrays, adhering to vendor-recommended best practices while maintaining compatibility with the broader XenServer ecosystem.

Testing:

  • Manually verified udev rules on test systems with PureStorage arrays.
  • Confirmed compatibility with non-PureStorage environments.
  • Ran unit tests for related storage subsystems.

This change is backward-compatible, introduces no breaking changes and only affect PureStorage arrays.

@ylebris ylebris marked this pull request as ready for review January 22, 2025 17:14
@ylebris ylebris marked this pull request as draft January 22, 2025 17:59
This commit integrates PureStorage-recommended udev rules to optimize queue settings for Citrix XenServer. These changes follow the guidelines outlined in the PureStorage Knowledge Base article [#kbid](https://support.purestorage.com/bundle/m_citrix/page/Solutions/Citrix/Citrix_XenServer/topics/task/t_applying_queue_settings_with_udev.html).

Key changes:
- Implemented udev rules to adjust IO scheduler and queue depth for PureStorage volumes.
- Ensured compliance with existing XenServer storage management (SM) conventions.
- Verified functionality through test scenarios to avoid regression with non-PureStorage configurations.

Motivation:
These changes aim to improve performance and reliability for deployments using PureStorage arrays, adhering to vendor-recommended best practices while maintaining compatibility with the broader XenServer ecosystem.

Testing:
- Manually verified udev rules on test systems with PureStorage arrays.
- Confirmed compatibility with non-PureStorage environments.
- Ran unit tests for related storage subsystems.

This change is backward-compatible, introduces no breaking changes and only affect PureStorage arrays.

Signed-off-by: Yann LE BRIS <yann.lebris@vates.tech>
@ylebris ylebris force-pushed the upstream-iscsi-optimization-purestorage branch from 83bc183 to bfbb200 Compare January 23, 2025 09:44
@ylebris ylebris changed the title feat: add udev rules for PureStorage - best practices Add udev rules for PureStorage - best practices Jan 23, 2025
@ylebris ylebris marked this pull request as ready for review January 23, 2025 09:45
@ylebris
Copy link
Author

ylebris commented Jan 23, 2025

@MarkSymsCtx ready to be reviewed

@MarkSymsCtx
Copy link
Contributor

I would much rather see this submitted to XenServer from Pure themselves through our Partner relationship team than to take an essentially random PR that we are unable to test.

@olivierlambert
Copy link

Hi

It's not a random PR, Yann is working at Vates. Also, the PR points to the reference from Pure Storage. If you want someone from Pure to write a message in here, this is doable.

Thanks for reviewing the PR.

@MarkSymsCtx
Copy link
Contributor

The kbid make no mention of modifying the udev rules for DM devices only for the sd devices that match the PURE vendor.

Signed-off-by: Yann LE BRIS <yann.lebris@vates.tech>
@ylebris ylebris force-pushed the upstream-iscsi-optimization-purestorage branch from 21822da to cefeb90 Compare January 24, 2025 17:01
@ylebris
Copy link
Author

ylebris commented Jan 24, 2025

@MarkSymsCtx you can review again.

Copy link
Contributor

@MarkSymsCtx MarkSymsCtx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested by Pure engineering.

ACTION=="add|change", KERNEL=="dm-[0-9]*", SUBSYSTEM=="block", ENV{DM_NAME}=="3624a937*", ATTR{queue/rq_affinity}="2"

# Set the HBA timeout to 60 seconds
ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{model}=="FlashArray ", RUN+="/bin/sh -c 'echo 60 > /sys/$DEVPATH/device/timeout'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pure engineering have reviewed this and requested that this line be changed to

ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{model}=="FlashArray      ", ATTR{device/timeout}="60"

Copy link
Contributor

@stormi stormi Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change seems reasonable, but you asked us to change our PR to match the vendor KB, and now you ask us to diverge from the vendor KB, for a change which at first sight does the same thing, albeit in a cleaner way (but I'm no expert in udev rules so I might be wrong). Does Pure engineering intend to update their KB with their own request?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We independently raised this directly with Pure engineering through their support team, it's taken them that long to come back to us with an answer to confirm that aside from that one line they are happy with the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Let's hope they have the reflex to update the KB later on :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have asked them that as well.

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.

4 participants