White Papers

Useful tools
49 Dell EMC SC Series: Red Hat Enterprise Linux Best Practices | CML1031
Remove obsolete targets on the system:
# rescan-scsi-bus.sh r
Scan for LUN size changes (after increasing it on SC Series storage system) and adjust the LUN size
accordingly on the system:
# rescan-scsi-bus.sh -s
5.3 The scsi_id command
The scsi_id command can be applied on each volume one at a time. When there are many volumes on a
Linux system, it is easier to query the volumes with a script. The following sample script applies the scsi_id
command and correlates Linux device names (/block/sdX or /dev/sdX) to their respective WWID values.
#!/bin/bash
# Script name get_WWID.sh
OSMajor=`uname -r |sed -rn 's/^.*(el.).*$/\1/p'`
echo "INFO: OS Major rev. ${OSMajor} detected!"
if [[ "${OSMajor}" =~ el5 ]]; then
cmd="/lib/udev/scsi_id -g -u -s /block/"
elif [[ "${OSMajor}" =~ (el6|el7|el8) ]]; then
cmd="/lib/udev/scsi_id --page=0x83 --whitelisted --device=/dev/"
else
echo "WARN: OSMajor parameter of unknown value, Exiting"
exit 1
fi
for i in `cat /proc/partitions | awk '/sd/ {print $4}'`
do
echo "Device: $i WWID: `${cmd}${i}`"
done | sort -k4
The script returns the following results.
# ./get_WWID.sh
INFO: OS Major Rev. el7 detected!
[snip]
Device: sdd WWID: 36000d3100000650000000000000017f2
Device: sdf WWID: 36000d3100000650000000000000017f2
Device: sdj WWID: 36000d3100000650000000000000017f2
Device: sdl WWID: 36000d3100000650000000000000017f2
[snip]