Re: LIO IBLOCK VPD unit_serial generation.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26/02/13 19:22, Tregaron Bayly wrote:
On Tue, 2013-02-26 at 19:10 +0000, Benjamin ESTRABAUD wrote:
I've been wondering where in the target driver the IBLOCK VPD
"unit_serial" attribute was populated.
It originates in generate_wwn() in rtslib/utils.py, which generates a
random uuid using python's uuid library.

  I seem to get a "random" id regardless of whether the IBLOCK is created over a standard
block device (a RAID), or a SCSI one (a SATA or SAS drive).
Correct

Also, can this be modified through the configfs interface?
Yes, provided that the export_count is zero (ie it is not currently
exported as a lun) you can echo the desired serial number to
target/core/iblock_#/<configname>/wwn/vpd_unit_serial.

In the json savefile it is stored (and retrieved) in the wwn value for
each object in the storage_objects array.

hth,

Tregaron Bayly

This does help a lot indeed! I was searching and searching through the driver source without finding anything, never occured to me that this could have been set in userland! Thanks! :)

I had also tried to update the unit_serial through configfs but of course my export_count was not zero. This explains that too.

Thanks a lot for your help!

Regards,
Ben.
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux