It has been documented kernel behaviour for many years now that you can not rely on consistent device naming for drives even across reboots on the same server, let alone on different servers.
You will have to write your auto-RAID setup script to detect which drives are in the system and distinguish between the root SSD and the storage JBOD drives.
One obvious way to detect the root drive is to run
mount | grep " on / ".
Otherwise, you can use
/dev/disk/by-id/, which is a symlink farm populated by
udev. Each entry is a symlink with a name based on the drive's manufacturer and serial number, with the symlinks pointing to the block devices for the drives (and partitions, if any). e.g. on one of my systems,
lrwxrwxrwx 1 root root 9 Jul 24 16:56 ata-ST2000DL003-9VT166_5YD1QFAG -> ../../sdb
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-ST2000DL003-9VT166_5YD1QFAG-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-ST2000DL003-9VT166_5YD1QFAG-part9 -> ../../sdb9
lrwxrwxrwx 1 root root 9 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5353040 -> ../../sdd
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5353040-part1 -> ../../sdd1
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5353040-part9 -> ../../sdd9
lrwxrwxrwx 1 root root 9 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5379164 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5379164-part1 -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARS-00MVWB0_WD-WCAZA5379164-part9 -> ../../sdc9
lrwxrwxrwx 1 root root 9 Jul 24 16:56 ata-WDC_WD20EARX-008FB0_WD-WCAZAJ827116 -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARX-008FB0_WD-WCAZAJ827116-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 24 16:56 ata-WDC_WD20EARX-008FB0_WD-WCAZAJ827116-part9 -> ../../sda9
That's one Seagate 2TB drive, and three WD 2TB drives, each with two partitions (partitions 1 and 9 - and yes, they're used for a zfs pool).
If your script created a single partition on each RAID drive (highly recommended), and used that partition instead of the entire drive, it would be easy to identify drives which are already in use (i.e. have a partition) and those which are not (and thus may safely used in a raid array).
There will almost certainly be device names beginning with
wwn- in that directory as well. These are the World Wide Name identifiers belonging to each drive. I find them less useful than the vendor+serial number names because they don't provide any obvious way to physically identify the drives without using a lookup table to translate OUI codes to manufacturers.