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

rescan_scsi_bus.sh: Why it's pointless to do a target scan on FC ? #20

Closed
wenchao-hao opened this issue Aug 2, 2022 · 3 comments
Closed

Comments

@wenchao-hao
Copy link

There is comment in rescan_scsi_bus.sh fo FC host which would make it unable to scan single LUN, but what is the reason?
Why do not do target scan on FC?

  if [ -e "/sys/class/fc_host/host$host" ] ; then
    # It's pointless to do a target scan on FC
    issue_lip=/sys/class/fc_host/host$host/issue_lip
    if [ -e "$issue_lip" ] && [ "$lipreset" -ge 0 ] ; then
      echo 1 > "$issue_lip" 2> /dev/null;
      udevadm_settle
      [ "$lipreset" -gt 0 ] && sleep "$lipreset"
    fi
    channelsearch=
    idsearch=
@doug-gilbert
Copy link
Owner

Even though the rescan_scsi_bus.sh script is in sg3_utils, it is sourced from folks at Suse who asked me to "carry" it in sg3_utils. I have no experience with FC so I can't answer your question but did forward it on to some people who might be able to answer. If so I'll send a follow-up reply.

@wenchao-hao
Copy link
Author

If so I'll send a follow-up reply.

Thanks a lot for your answer.
I would do some test and check if it is OK to scan target on FC. It the result is ok, I might submit a PR.

wenchao-hao pushed a commit to wenchao-hao/sg3_utils that referenced this issue Aug 9, 2022
…h lip

lip is a FC operation and can be used to rescan device. While it can not
specify the channel and target. So here add a new option make scan FC
hosts according SCSI general interface which is
/sys/class/scsi_host/hostX/scan.

The default value of no_lip_scan is 0 which do not change the behavior
default.

Fix doug-gilbert#20

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
wenchao-hao pushed a commit to wenchao-hao/sg3_utils that referenced this issue Aug 9, 2022
lip is a FC operation and can be used to rescan device. While it can not
specify the channel and target. So here add a new option make scan FC
hosts according SCSI general interface which is
/sys/class/scsi_host/hostX/scan.

The default value of no_lip_scan is 0 which do not change the behavior
default.

Fix doug-gilbert#20

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>
@wenchao-hao
Copy link
Author

@doug-gilbert I tested and found it's ok to scan FC device via channel and target ID. I submitted a PR which add an option to address it.

mwilck pushed a commit to openSUSE/sg3_utils-until-2023 that referenced this issue Jan 27, 2023
lip is a FC operation and can be used to rescan device but it can not
specify the channel and target. So add a new option to scan FC hosts
according to the SCSI general interface in sysfs:
/sys/class/scsi_host/hostX/scan.

The default value of no_lip_scan is 0 which does not change the
default behavior.

Fix doug-gilbert/sg3_utils#20

cherry-pick of 5a1cdab ("rescan-scsi-bus.sh: add option --no-lip-scan")

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>

git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@967 6180dd3e-e324-4e3e-922d-17de1ae2f315
hreinecke pushed a commit to hreinecke/sg3_utils that referenced this issue Aug 17, 2023
lip is a FC operation and can be used to rescan device but it can not
specify the channel and target. So add a new option to scan FC hosts
according to the SCSI general interface in sysfs:
/sys/class/scsi_host/hostX/scan.

The default value of no_lip_scan is 0 which does not change the
default behavior.

Fix doug-gilbert/sg3_utils#20

Signed-off-by: Wenchao Hao <haowenchao@huawei.com>


git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@967 6180dd3e-e324-4e3e-922d-17de1ae2f315
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 a pull request may close this issue.

2 participants