I need to anticipate the device name (`sdX`) that the next mass storage device (`sda`, `sdb`, `sdc`, …) will receive from the SCSI driver.

If I remove one device and connect another one, I noticed that the newly connected device will not take the name of the removed device, but will use the alphabetically following device name.

Where is this information stored? How long is it stored? How can I use this information in order to anticipate the device name that the next device will receive?