`rescan-scsi-bus.sh -r` command to remove the stale devices causing all the filesystem to go in read-only mode.
Issue
-
rescan-scsi-bus.sh -rcommand to remove the stale devices causing all the filesystem to go in read-only mode. This could result in kernel panic for a system booting from SAN. -
Following is the result of
rescan-scsi-bus.sh -r. -
With a package version lower than
sg3_utils-1.28-8.el6, we see correct output: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 for device 3 0 0 0 ... OLD: Host: scsi3 Channel: 00 Id: 00 Lun: 00 Vendor: NECVMWar Model: VMware IDE CDR10 Rev: 1.00 Type: CD-ROM ANSI SCSI revision: 05 0 new or changed device(s) found. 0 remapped or resized device(s) found. 0 device(s) removed. # touch file3 # ls -l file* -rw-r--r--. 1 root root 61 Feb 26 23:53 file1 -rw-r--r--. 1 root root 2062 Feb 27 00:25 file2 -rw-r--r--. 1 root root 0 Feb 27 00:47 file3 -
With the package version sg3_utils-1.28-9.el6_7, we see the issue occur:
2 new or changed device(s) found. ANSI SCSI revision: 05 NEW: [0:0:0:0] [0:0:1:0] 0 remapped or resized device(s) found. 3 device(s) removed. [0:0:0:0] [0:0:1:0] [3:0:0:0] # touch file4 touch: cannot touch `file4': Read-only file system
Environment
- Red Hat Enterprise Linux 6
- sg3_utils-1.28-9.el6_7
- rescan-scsi-bus.sh command
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.