[Bug 909111] New: The rescan-scsi-bus.sh from the sgutils package is broken since SuSE-13.1
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Bug ID: 909111 Summary: The rescan-scsi-bus.sh from the sgutils package is broken since SuSE-13.1 Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: x86-64 OS: openSUSE 13.2 Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: bnc-team-screening@forge.provo.novell.com Reporter: dmarkh@cfl.rr.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:33.0) Gecko/20100101 Firefox/33.0 Build Identifier: This script no longer "finds new" or "removes no longer attached" scsi devices. As shown below, I have a scsi disk at scsi ID-0 at /dev/sg5. # lsscsi -g [0:0:0:0] disk ATA ST3320620AS K /dev/sda /dev/sg0 [13:0:0:0] process Marvell 91xx Config 1.01 - /dev/sg1 [16:0:0:0] disk IMPRIMIS 94601-15 4614 /dev/sdd /dev/sg5 [17:0:0:0] cd/dvd LITE-ON DVDRW LH-20A1P KL0G /dev/sr0 /dev/sg2 [18:0:0:0] disk ATA ST3160811AS E /dev/sdb /dev/sg3 [18:0:1:0] disk ATA ST3160815AS B /dev/sdc /dev/sg4 I remove the drive at scsi ID-0 drive and install an additional drive at scsi ID-1 then run the script. # rescan-scsi-bus.sh Scanning SCSI subsystem for new devices Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning for device 0 0 0 0 ... OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3320620AS Rev: K Type: Direct-Access ANSI SCSI revision: 05 Scanning host 1 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 3 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 5 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 6 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 7 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 8 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 9 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 10 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 11 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 12 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 13 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning for device 13 0 0 0 ... OLD: Host: scsi13 Channel: 00 Id: 00 Lun: 00 Vendor: Marvell Model: 91xx Config Rev: 1.01 Type: Processor ANSI SCSI revision: 05 Scanning host 14 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 15 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 16 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning for device 16 0 0 0 ... OLD: Host: scsi16 Channel: 00 Id: 00 Lun: 00 Vendor: IMPRIMIS Model: 94601-15 Rev: 4614 Type: Direct-Access ANSI SCSI revision: 01 Scanning host 17 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning for device 17 0 0 0 ... OLD: Host: scsi17 Channel: 00 Id: 00 Lun: 00 Vendor: LITE-ON Model: DVDRW LH-20A1P Rev: KL0G Type: CD-ROM ANSI SCSI revision: 05 Scanning host 18 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning for device 18 0 0 0 ... OLD: Host: scsi18 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: ST3160811AS Rev: E Type: Direct-Access ANSI SCSI revision: 05 Scanning for device 18 0 1 0 ... OLD: Host: scsi18 Channel: 00 Id: 01 Lun: 00 Vendor: ATA Model: ST3160815AS Rev: B Type: Direct-Access ANSI SCSI revision: 05 0 new or changed device(s) found. 0 remapped or resized device(s) found. 0 device(s) removed. # lsscsi -g [0:0:0:0] disk ATA ST3320620AS K /dev/sda /dev/sg0 [13:0:0:0] process Marvell 91xx Config 1.01 - /dev/sg1 [16:0:0:0] disk IMPRIMIS 94601-15 4614 /dev/sdd /dev/sg5 [17:0:0:0] cd/dvd LITE-ON DVDRW LH-20A1P KL0G /dev/sr0 /dev/sg2 [18:0:0:0] disk ATA ST3160811AS E /dev/sdb /dev/sg3 [18:0:1:0] disk ATA ST3160815AS B /dev/sdc /dev/sg4 It not only did not remove the one at ID-0 that was removed, but did not find the new one attached. Below is an "lsscsi -g" after a reboot with BOTH drives attached. #lsscsi -g [0:0:0:0] disk ATA ST3320620AS K /dev/sda /dev/sg0 [13:0:0:0] process Marvell 91xx Config 1.01 - /dev/sg1 [16:0:0:0] disk IMPRIMIS 94601-15 4614 /dev/sdd /dev/sg5 [16:0:1:0] disk IMPRIMIS 94601-15 4614 /dev/sde /dev/sg6 [17:0:0:0] cd/dvd LITE-ON DVDRW LH-20A1P KL0G /dev/sr0 /dev/sg2 [18:0:0:0] disk ATA ST3160811AS E /dev/sdb /dev/sg3 [18:0:1:0] disk ATA ST3160815AS B /dev/sdc /dev/sg4 Reproducible: Always Steps to Reproduce: 1. See details 2. 3. Actual Results: This script, before SuSE-13.1 would remove any disks physically removed and add any physically added since boot. It is broken This is NOT kernel related as the same thing happens with a vanilla 3.16.7 kernel. I'm fairly certain this is a systemd issue. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bwiedemann@suse.com, | |jengelh@inai.de, | |rmilasan@suse.com Assignee|bnc-team-screening@forge.pr |hare@suse.com |ovo.novell.com | -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 --- Comment #1 from Mark Hounschell <dmarkh@cfl.rr.com> --- This bug is still valid in opensuse-13.2 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Johannes Thumshirn <jthumshirn@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dmarkh@cfl.rr.com Flags| |needinfo?(dmarkh@cfl.rr.com | |) --- Comment #2 from Johannes Thumshirn <jthumshirn@suse.com> --- Created attachment 633844 --> http://bugzilla.opensuse.org/attachment.cgi?id=633844&action=edit Updated rescan-scsi-bus.sh Please re-test using the attached rescan-scsi-bus.sh version -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 --- Comment #3 from Mark Hounschell <dmarkh@cfl.rr.com> --- OK i tried the new script but nothing changed. My SCSI devices before: # lsscsi -g [0:0:0:0] disk ATA ST3160815AS B /dev/sda /dev/sg0 [1:0:0:0] disk ATA ST3160815AS D /dev/sdb /dev/sg1 [2:0:0:0] disk ATA ST3160811AS E /dev/sdc /dev/sg2 [3:0:0:0] disk ATA ST3160815AS D /dev/sdd /dev/sg3 [6:0:0:0] disk ATA ST3500320NS SN06 /dev/sde /dev/sg4 [7:0:0:0] disk ATA ST3500320NS SN04 /dev/sdf /dev/sg5 [8:0:0:0] cd/dvd SONY DVD RW AD-7260S 1.61 /dev/sr0 /dev/sg6 [8:0:1:0] disk ATA ST3500418AS CC38 /dev/sdg /dev/sg7 [10:0:2:0] tape HP 88780 A674 /dev/st1 /dev/sg10 [10:0:6:0] tape EXABYTE EXB-8500-85Qanx0 0446 /dev/st2 /dev/sg11 [11:0:0:0] disk SEAGATE ST15150N 5055 /dev/sdh /dev/sg8 [11:0:3:0] tape SONY SDT-10000 0110 /dev/st0 /dev/sg9 I removed the SONY tape drive on bus 11 at /dev/st0 , /dev/sg9 and added another SEAGATE SCSI disk at SCSI ID 1 on bus 11. #./rescan-scsi-bus.sh Scanning SCSI subsystem for new devices Scanning host 0 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg0 changed: device 0 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3160815AS Rev: B Type: Direct-Access ANSI SCSI revision: 05 Scanning host 1 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg1 changed: device 1 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3160815AS Rev: D Type: Direct-Access ANSI SCSI revision: 05 Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg2 changed: device 2 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3160811AS Rev: E Type: Direct-Access ANSI SCSI revision: 05 Scanning host 3 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg3 changed: device 3 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3160815AS Rev: D Type: Direct-Access ANSI SCSI revision: 05 Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 5 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 6 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg4 changed: device 6 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3500320NS Rev: SN06 Type: Direct-Access ANSI SCSI revision: 05 Scanning host 7 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg5 changed: device 7 0 0 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3500320NS Rev: SN04 Type: Direct-Access ANSI SCSI revision: 05 Scanning host 8 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg6 changed: device 8 0 0 0 ... from:CD-ROM : 00 to: CD-ROM : SONY Model: DVD RW AD-7260S Rev: 1.61 Type: CD-ROM ANSI SCSI revision: 05 sg7 changed: device 8 0 1 0 ... from:Direct-Access : 00 to: Direct-Access Model: ST3500418AS Rev: CC38 Type: Direct-Access ANSI SCSI revision: 05 Scanning host 9 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs Scanning host 10 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg10 changed: device 10 0 2 0 ... from:Sequential-Access n: 00 to: Sequential-Access Model: 88780 Rev: A674 Type: Sequential-Access ANSI SCSI revision: 01 sg11 changed: device 10 0 6 0 ... from:Sequential-Access n: 00 to: Sequential-Access Model: EXB-8500-85Qanx0 Rev: 0446 Type: Sequential-Access ANSI SCSI revision: 02 Scanning host 11 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs sg8 changed: device 11 0 0 0 ... from:Direct-Access n: 00 to: Direct-Access TE Model: ST15150N Rev: 5055 Type: Direct-Access ANSI SCSI revision: 02 sg9 changed: INQUIRY failed .. OLD: Host: scsi11 Channel: 00 Id: 03 Lun: 00 Vendor: SONY Model: SDT-10000 Rev: 0110 Type: Sequential-Access ANSI SCSI revision: 02 0 new or changed device(s) found. 0 remapped or resized device(s) found. 0 device(s) removed. harley:/home/markh # lsscsi -g [0:0:0:0] disk ATA ST3160815AS B /dev/sda /dev/sg0 [1:0:0:0] disk ATA ST3160815AS D /dev/sdb /dev/sg1 [2:0:0:0] disk ATA ST3160811AS E /dev/sdc /dev/sg2 [3:0:0:0] disk ATA ST3160815AS D /dev/sdd /dev/sg3 [6:0:0:0] disk ATA ST3500320NS SN06 /dev/sde /dev/sg4 [7:0:0:0] disk ATA ST3500320NS SN04 /dev/sdf /dev/sg5 [8:0:0:0] cd/dvd SONY DVD RW AD-7260S 1.61 /dev/sr0 /dev/sg6 [8:0:1:0] disk ATA ST3500418AS CC38 /dev/sdg /dev/sg7 [10:0:2:0] tape HP 88780 A674 /dev/st1 /dev/sg10 [10:0:6:0] tape EXABYTE EXB-8500-85Qanx0 0446 /dev/st2 /dev/sg11 [11:0:0:0] disk SEAGATE ST15150N 5055 /dev/sdh /dev/sg8 [11:0:3:0] tape SONY SDT-10000 0110 /dev/st0 /dev/sg9 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Johannes Thumshirn <jthumshirn@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Flags|needinfo?(dmarkh@cfl.rr.com | |) | --- Comment #4 from Johannes Thumshirn <jthumshirn@suse.com> --- Could you please run the script with sh -x and attach the logs here, so I can have a look what's actually going wrong. Thanks -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Per Jessen <per@computer.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |per@computer.org -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c22 --- Comment #22 from Per Jessen <per@computer.org> --- Have just tried this on Tumbleweed with sg3_utils 1.43 - added a drive, rescan-scsi-bus.sh did not find it. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c30 Mark Hounschell <dmarkh@cfl.rr.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|Leap 15.0 |Leap 15.3 Target Milestone|Leap 15.0 |Leap 15.3 OS|openSUSE 42.3 |All --- Comment #30 from Mark Hounschell <dmarkh@cfl.rr.com> --- This bug still exists even though the original BUG report was back in 2015. The last rescan-scsi-bus.sh that actually worked was from the 12.3 dist. I have had to keep the version for 12.3 on my system every since because I use it constantly. Please fix this BUG. I would be happy to attach the 12.3 version of this script but find no way to do it but inline here. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c31 --- Comment #31 from Bernhard Wiedemann <bwiedemann@suse.com> --- Created attachment 852026 --> http://bugzilla.opensuse.org/attachment.cgi?id=852026&action=edit diff between 12.3 and 13.1 versions obtained with unrpm on /mounts/schnell/CD-ARCHIVE/openSUSE/12.3/POOL/suse/x86_64/sg3_utils-1.33-5.1.1.x86_64.rpm /mounts/schnell/CD-ARCHIVE/openSUSE/13.1/POOL/suse/x86_64/sg3_utils-1.36-3.1.2.x86_64.rpm -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 Bernhard Wiedemann <bwiedemann@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|The rescan-scsi-bus.sh from |sg3_utils: |the sgutils package is |rescan-scsi-bus.sh is |broken since SuSE-13.1 |broken since SuSE-13.1 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c34 --- Comment #34 from Mark Hounschell <dmarkh@cfl.rr.com> --- I've added it. # Returns the list of existing targets per host idlist () { local tmpid local newid local oldid oldlist=$(ls /sys/class/scsi_device/ | sed -n "s/${host}:${channel}:\([0-9]*:[0-9]*\)/\1/p" | uniq) # Rescan LUN 0 to check if we found new targets echo "${channel} - -" > /sys/class/scsi_host/host${host}/scan udevadm_settle newlist=$(ls /sys/class/scsi_device/ | sed -n "s/${host}:${channel}:\([0-9]*:[0-9]*\)/\1/p" | uniq) It did not help though. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c35 --- Comment #35 from Mark Hounschell <dmarkh@cfl.rr.com> --- Let me go back and verify which version actually broke it. I went from 12.3 to 13.2. I never used 13.1. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c36 --- Comment #36 from Mark Hounschell <dmarkh@cfl.rr.com> --- The rescan-scsi-bus.sh from the 13.1 dist also works. It breaks at 13.2. I just now verified this. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c38 --- Comment #38 from Mark Hounschell <dmarkh@cfl.rr.com> --- Just an FYI, I am running these scripts on 15.3. I have plenty of SCSI devices to play with so anything you want me to try, I can. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c41 --- Comment #41 from Mark Hounschell <dmarkh@cfl.rr.com> --- Ah, the "-a" flag seems to do the trick. Do you still want the "sh -x" log file? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=909111 http://bugzilla.opensuse.org/show_bug.cgi?id=909111#c43 --- Comment #43 from Mark Hounschell <dmarkh@cfl.rr.com> --- Yes, I have verified that the rescan script in 15.3 works with the "-a" flag as far as discovering newly added devices. This script originally discovered new and removed devices with no "-flags". It appears now that in order for it to work as it did originally you must pass not only the "-a" but the "-r" flag also. The "-r" flag removes removed devices from the list displayed by the "lsscsi -g" command. Yes, you can close this bug now. Thank you. -- You are receiving this mail because: You are on the CC list for the bug.
participants (2)
-
bugzilla_noreply@novell.com
-
bugzilla_noreply@suse.com