OSD Object Files Hierarchy
OSD Simulator
program is responsible for processing of OSD requests. This will
accept OSD request from iSCSI-OSD Module and implements them on
local file
system. Directory (osd_base) is exported as OSD device. Objects
are represented
in terms of files.
There are two files associated with each object
_data : stores data
information for the object
_attr : stores metadata information that is attribute pages defined by
T10
standard for the object
For Root Object:
osd_base/root_data
osd_base/root_attr
For Partition Object:
For Partition 0 -
osd_base/ox0_attr and osd_base/0x0_data
For other partitions -
osd_base/part_id/_attr and
osd_base/part_id/_data
For User/Collection Object:
osd_base/part_id/OBJECTID_attr and osd_base/part_id/OBJECTID_data
Note that, according to T10 standard, there is no data
information associated with ROOT, PARTITION or COLLECTION
Objects. We are implementing data files for
ROOT, PARTITION, COLLECTION objects for internal purpose to
speed up processing of OSD LIST commands. ROOT data file
stores list of all partitions, PARTITION data file stores list
of all user/collection objects and Collection data file
stores list of all member user objects. This data will not be
accessible through OSD commands. OSD commands with data
operations on these objects will fail with error.
OSD Object Files Hierarchy looks like:
[OSD_BASE DIRECTORY](root_data,root_attr,0_attr,0_data)
====================================================
/
|
\
/
|
\
/
| .........................................
\
/
|
\
\/
\/
\/
[part_1 directory ]
[part_2 directory]
============== =
===============
_attr , _data
_attr , _data
obj1_attr,obj1_data
obj1_attr,obj1_data
obj2_attr,obj2_data
obj2_attr,obj2_data
I mplementation features
Support for OSD-IO Devices in IET
This package extends iSCSI Enterprise target to provide support
for OSD Type devices. We have introduced osd-io as new
device type along with existing supported device types. Any
directory can be exported as OSD LUN.
Separation of iSCSI-OSD Module and OSD Simulator Module
Unlike other open source implementations where OSD target
implementation is mix of OSD simulator and iSCSI target code, we
have separated iSCSI OSD interface and OSD simulator
implementation. iSCSI target talks with OSD simulator with
socket interface (Similar to OSD T10 interface). This interface
is implemented as module in iSCSI target code.
Compatibility
By
adding such interface to any other IP SAN technology module, OSD
simulator can be made compatible with that. As a next step
porting can be done to Linux SCSI Target framework project (tgt).
(http://stgt.berlios.de/).
Exporting Multiple OSD devices
Compared to other implementations where it is required to start
new instance of iSCSI Target for each OSD exported device and
modification, recompilation of source code with respect to
target and initiator and recompilation. In our implementation,
Single instance of iSCSI target allows exporting of any number
of OSD devices by making entry in configuration file. There will
not be any source code modifications or recompilation for adding
new OSD LUN.
T10 Standard Compliant
OSD simulator code is iSCSI target technology independent code,
which accepts commands through socket interface and implements
them. OSD Simulator implementation is compliant to T10 OSD-2
specification rev0.
Presently, we support NOSEC security method only.
Support for Collection Objects
This is first implementation of OSD Simulator that provides support for Collection objects. As defined by T10 standard, support for OSD collection commands LIST COLLECTION, CREATE COLLECTION, REMOVE COLLECTION is provided.
Besides this, we have introduced two new commands for ease in
accessing
collection objects (ADD_TO_COLLECTION and REMOVE_FROM_COLLECTION).
Format of these commands is similar to REMOVE COLLECTION (OSD-2
T10 standard section 6.19) with new field OBJECT_TO_ADD/REMOVE
as offset 32 as shown in the diagram below.
OSD ADD_TO_COLLECTION/REMOVE_FROM_COLLECTION COMMAND
-----------------------------------------------------------------------
8-9 |
Service Action
|
----------------------------------------------------------------------
10 |
Options Byte
|
----------------------------------------------------------------------
11 | Resvd |
Get/Set CDBFMT | Resvd
|FCR|
----------------------------------------------------------------------
12 |
Timestamp Control
|
----------------------------------------------------------------------
13-15 |
Resvd
|
----------------------------------------------------------------------
16-23 |
Partition ID
|
----------------------------------------------------------------------
24-31 |
Collection Object ID
|
----------------------------------------------------------------------
32-39 |
Object To ADD/REMOVE
|
---------------------------------------------------------------------
40-51 |
Resvd
|
---------------------------------------------------------------------
52-79 |
Get and Set attribute parameters
|
---------------------------------------------------------------------
80-159 |
Capability
|
---------------------------------------------------------------------
160-199 |
Security Parameters
|
----------------------------------------------------------------------