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

return extra lun info and allow create with direct_io_pattern #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pfrybar
Copy link

@pfrybar pfrybar commented Apr 12, 2023

Great project! I've started to use the dsm/webapi module for a project of my own - a CLI for Synology iSCSI storage which you can see here.

Two features I would love to have for my CLI are:

  1. Returning the DevAttribs along with the LUN info. My CLI allows creating a LUN with extra features like space reclamation and FUA/Sync cache. These are dev attributes which are already supported in the LunCreateSpec. However I can't display whether an existing LUN has these enabled or not since the dev attributes are not returned by the get/list methods.
  2. Specify the I/O Policy during LUN creation. In the DSM webapp, you can see this option when editing a LUN, as shown in the first image below. I've tested it and this parameter can be passed along during LUN creation as well. By default, a LUN is created with a policy of 0 which maps to Buffered I/O. You can see this in the DSM SYNO.Core.ISCSI.LUN API response from the second image below. A value of 3 maps to the Direct I/O option.

This small PR adds both these features.

Screenshot 2023-04-12 at 11 17 41

Screenshot 2023-04-12 at 11 24 11

Location string
Size int64
Type string
DirectIOPattern int
Copy link
Author

Choose a reason for hiding this comment

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

Adding this field is backwards compatible since the default value for an int is 0, which maps to the default I/O pattern (Buffered I/O) when creating a new LUN.

@gjrtimmer
Copy link

@chihyuwu Could you please look at this, I hope it will gets merged soon.
@pfrybar Could you rebase, so the repository maintainer can merge it, I hope it will get merged soon.

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