[stgt] Late opening of the backing store

Môshe van der Sterre me at moshe.nl
Wed Jan 18 18:20:35 CET 2012


When a LUN is created with tgtd, tgtd immediately open()s the backing 
store, however I don't think data is actually read before a connection 
from an initiator is made.

My question is, is there an option to make tgtd open the file the 
moment a connection is made (and not before)?
And if this is not currently possible, what would it take to implement 
As a related feature, the backing store could be close()d after the 
(last) connection has ended.

Such an option would make the activity status of the backing store 
available to other program's, for example LVM tools.
For example, udev triggered scripts can be used to add LVM volumes to 
a target (when created), but this can not be done to remove them, as 
the LVM tools will (currently) think the volume is in use.

With the feature to only open the backing store when actually used, 
the udev scripts to automatically add and remove volumes can be made.

Are there any ideas on how easily this could be implemented? Or maybe 
comments on why this would not be a good idea?
Maybe it is possible to create such a setup another way?

Thanks in advance,
Môshe van der Sterre

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

More information about the stgt mailing list