[Stgt-devel] Store persistent media data in extended attributes?

ronnie sahlberg ronniesahlberg
Sat May 3 07:25:31 CEST 2008


Please comment.

A lot of SCSI device types contain a lot of persistent metadata.

Some of these would be the medium auxiliary memory that is accessed by
SPC : READ/WRITE ATTRIBUTE which is available for many device types.

SMC contains things such as SEND VOLUME TAG.

Many device types contain mode page settings, settable from the
initiator and which are supposed to be "persistent" across power and
unload/load cycles.
For example SSC : WORM settings.

UnitSerialNumber which all medias provide is similar, once I have
specified the USN to a device, to me it would make sense if this USN
would be persistent so next time I
export that file as a SCSI device, it should automatically use the
same USN that was previously attached to the device.
tgtadm --lld iscsi --mode logicalunit --op update --tid $TID --lun
$LUN  --params scsi_sn=FRED00,scsi_id=Fred
Wouldnt it make sense that once this command is issued, the sn and the
id is stored persistently with that backing store file   so that they
apply automagically
next time this volume is exported?
I.e.   you specify/set the serial number once, and it remains
persistent for the remainder of the lifetime of the backing store file
itself. Not having to reapply the setting every single time
you startup tgtd again.

For MMC and SSC devices, this could include things like the barcode
for the media.

For SSC it could also include the metadata such as where the filemark
markers are. (there is a lot of metadata required in ssc).

Would it make sense to implement some smallish API to attach these
kinds of metadata to extended attributes attached to the backing store

ronnie sahlberg

More information about the stgt mailing list