Re: Late opening of the backing store

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

 



There used to be physical SCSI SBC devices that had removable media,
so the concept of a "block device  but no disk mounted"
is not unheard of,   but I think they are rare today.


I guess these type of devices would return something like
ASC_MEDIUM_NOT_PRESENT for CDBs that try to access the media (read*/write*)

It would also need to set the RMB bit in the standard INQ data to tell
the initiator that the LUN supports removable media


regards
ronnie sahlberg

On Thu, Jan 19, 2012 at 9:17 AM, FUJITA Tomonori
<fujita.tomonori@xxxxxxxxxxxxx> wrote:
> On Wed, 18 Jan 2012 23:06:36 +0100
> **UNKNOWN CHARSET** <me@xxxxxxxx> wrote:
>
>> (Oops, I clicked the wrong reply button)
>>
>> Hi Fujita,
>>
>>
>> On Thu, 19 Jan 2012 06:31:19 +0900, FUJITA Tomonori
>> <fujita.tomonori@xxxxxxxxxxxxx> wrote:
>> > **UNKNOWN CHARSET** <me@xxxxxxxx> wrote:
>> >
>> >> 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
>> >> this?
>> >> As a related feature, the backing store could be close()d after the
>> >> (last) connection has ended.
>> >
>> > tgt enables you to add/remove logical units any time. Why you can't
>> > add a device such as lvm volumes when it's ready?
>>
>> Adding works fine. The problem is, the moment it is added, the
>> file/volume/disk is 'in use' (by stgt), this prevents (for example) the
>> lvm tools from changing or removing the device.
>>
>> For example, I want the ability to export all volumes in a LVM
>> volumegroup automatically, this can easily be done with a udev script
>> to
>> add the LUN. The same could be done for removing the volume, only stgt
>> prevents this by making LVM mark the device 'in use'. I would like a
>> option so stgt only 'uses' the device, if there is a connection that
>> _really_ uses the device.
>
> Why you can't remove the device from tgt?
>
>
>> Is short this means stgt should defer the open() call on the backing
>> store until a connection is requested. Likewise, it should close() the
>> backing store when the last connection closes.
>> I am guessing such a feature does not yet exist (I couldn't find it),
>
> tgt supports such feature for MMC logical units. But what tgt should
> return to initiators when the initiators try to access to devices that
> are not available?
> --
> To unsubscribe from this list: send the line "unsubscribe stgt" 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 stgt" 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]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux