Persistent device names under Ubuntu Lucid LTS Server

Joseph Salisbury joseph.salisbury at canonical.com
Thu Jan 13 19:07:31 UTC 2011


On 01/13/2011 12:32 PM, carlopmart wrote:
> On 01/13/2011 06:14 PM, Joseph Salisbury wrote:
>> On 01/13/2011 11:40 AM, carlopmart wrote:
>>> Hi all,
>>>
>>>   How can I configure persistent name for an iscsi disk that i have
>>> attached to an ubuntu lucid server??
>>>
>>>   For example, under RHEL5.x releases, I have created an udev rule files
>>> with this content:
>>>
>>>   KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p",
>>> RESULT=="1IET_00020001", SYMLINK+="isda%n"
>>>
>>>   How can I do this with Ubuntu Lucid Server??
>>>
>>>   Thanks.
>>
>> Hello,
>>
>> Are you using multipathing?  If so, you can create an alias using the
>> WWID for the iscsi volume.  For example, you can add a section in
>> /etc/multipath.conf like the following:
>>
>> multipaths {
>>          multipath {
>>                  wwid                    THE_VOLUMES_WWID
>>                  alias                   THE_PERSISTANT_NAME_YOU_WANT
>>                  OTHER_OPTIONS_GO_HERE
>>          }
>> }
>>
>> Joe
>>
> 
> No, I am not using multipath...
> 

One option would be to use LVM2.

Also, you could also refer to the UUID in the path:
/dev/disk/by-uuid/UUID_FOR_ISCSI_VOLUME (Maybe eve create more
understandable sym-links to these UUIDs).

If you do that, you can modify your /etc/fstab file and replace the
device name in the first column with the new persistent name. For
example, replace /dev/sdaN with the following:

/dev/disk/by-uuid/UUID_FOR_ISCSI_VOLUME

This would be done for all the iSCSI volumes referenced in your fstab file.

I believe you could also list the device in the fstab with
UUID=UUID_FOR_ISCSI_VOLUME vs having the entire path.  Something to test.

Another option would be to use labels and replace the device name with:
/dev/disk/by-label/LABLE_NAME or LABLE=LABLE_NAME.

HTH,

Joe





More information about the ubuntu-server mailing list