One of the downsides to using iSCSI for network file store is that it can be difficult to keep track of what device name should be used to reference each lun.
By default, they appear in
as follows:
This is of course entirely accurate, but is perhaps not what we want - especially since any references to this resource will include the ip address, which in some environments might change.
There is however a useful feature of the
command which is that it can read the extended values of iSCSI resources from the exported disk.
On our iSCSI server we set one of the following page values: Device Identification Vital Product Data (page 0x83) or Unit Serial Number (page 0x80) to a name for this lun - in this case alice
We then add the following udev configuration to
Setting the page queried to either 80 or 83 as appropriate. Note that as I’m using the ietd iSCSI server, the SYSFS vendor and model fields are set as above - you may either exclude these, or use the scsi_id command to find out what yours appear as on the client.
This command will map the iSCSI device to
where X is replaced by the value given in the page specified.