Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.