Celeb Glow
news | March 15, 2026

How to get the SCSI identifier by scsi_id command?

I never want to change the SCSI disk's name(/dev/sd*) even if the one of disks has been removed.
Good article I found on Internet says that "Use the scsi_id command to get the unique SCSI identifier,then make a udev_rule file"

but scsi_id returns no answer in our all redhat5.3 boxes.

--Reproduce--

# ls -l /dev/disk/by-id | grep sdf
lrwxrwxrwx 1 root root 9 Aug 17 14:44 scsi-36000c291b99c1fbbf4dfadd25b36644b -> ../../sdf
#/sbin/scsi_id -g /dev/sdf --> NO answer
#/lib/udev/scsi_id -g /dev/sdf --> NO answer

--Put disk.enableUUID parameter to the VMware vmx file, then reboot.
Nothing changed.

--Added options=-g parameter to /etc/scsi_id.config, then reboot.
Nothing changed.

--Our context
Red Hat Enterprise Linux Server release 5.3 (Tikanga)
kernel 2.6.18-128.el5
iscsi-initiator-utils-6.2.0.872-16.el5

How can I get the SCSI identifier by scsi_id command?

1 Answer

FYI
Resolved by myself as following.

#/sbin/scsi_id -g -s /block/sdf
36000c291b99c1fbbf4dfadd25b36644b

-s option means:
Device files are put on under /sys virtual filesystem since kernel 2.6.
'-s' option force the scici_id to search under /sys directory.

-g :
Perhaps security reason, NO output allowed without this option.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy