SG_MAP devices chagne between reboots


I have an auto loader and two tape devices hooked up to a RHEL 5.8 server. The issue im having is that when this server is rebooted the tape devices and the auto loader device names change. so What was on /dev/sg3 could end up being on /dev/sg4 after reboot, this mean that my backup software cant find the device which means i need to configure this again. My question is how do i nail these devices to a particular device name?

I have googled but have not found what i'm looking for

Who is Participating?
This is because the physical device name can change between boots.  So ...

1. DYNAMICALLY use sg_map to do the cross-referencing whenever the script is invoked.  That is the only safe thing to do, because if you are on a SAN or have FC, or are multipathed, then even the physical device name can change.

2. Various SAS, FC, SCSI HBAS have persistance settings.  Check the manual for the HBA you are using and see how to set it up.  If you make the device names persistent, then the problem will go away.
The answer https:#a38351203  is correct.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.