Is there a way of relating the RAID units with the OS devices in 3ware?

Solution 1:

You should be able to retrieve detailed information from:

sudo /sbin/hdparm -I /dev/sda

smartctl is also 3ware aware.

smartctl -a -d 3ware,0 /dev/tw0

The above will check disk health and info for 3Ware port 0 that's behind the presented RAID drive /dev/tw0. It might also be /dev/sd* or /dev/twe*.

If you have tw_cli installed, you can do tw_cli info for a list of controllers, then for example tw_cli info c0 to see controller 0. This will include the serial number of member drives.

Solution 2:

No easy way to do this kind of task. Use unit size if you want to detect on which device your unit have been mounted.

Be careful with the identifier you use in /etc/fstab, prefer UUID when you use 3ware controller because sometimes units are not related to the same device name (/dev/sd*) accross reboots.