Ubuntu: Reconnecting to Drobo over iSCSI after server reboot



Question:

I have an iSCSI attached Drobo hooked up to a server that I use to put backups on. I connect to the Drobo using a command like:

sudo iscsiadm -m node --login

then I find what device is new in /dev ussually sda1 and mount it using:

mount /dev/sda1 /drobo

I would like to automate this everytime the system reboots. Although the Drobo ussually shows up as sda1 this is not always the case. Is there a way I can absolutely determine what device is the Drobo after running the iscsi login command.


Solution:1

Instead of mountinf /dev/sda1, you can use sudo blkid /dev/sda1 to determine the UUID of the partition and then modify /etc/fstab by replacing (or adding) the line:
/dev/sda1 /drobo ext4 defaults,noauto 0 0 with
UUID=[blikd_result] /drobo ext4 defaults,noauto 0 0
Thus it will follow the current naming of the iscsi session.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »