On Mon, 2011-11-28 at 13:52 +0100, Sebastian Andrzej Siewior wrote: > On 11/28/2011 01:02 PM, Nicholas A. Bellinger wrote: > > So I think a quick start in Documentation/target/ would be very helpful, > > but note that using direct configfs interaction for setup is not very > > typical these days, and especially not from end-users users of the > > target kernel code. > > I see. > > > The majority of people will be using the high level targetcli (rtsadmin) > > shell for configuration and rtslib python object code when interacting > > directly with /sys/kernel/config/target/. > > > > Also rtslib is currently generating it's own API documentation using > > epydoc, which already gives us very nice html and pdf formatted > > packages. ;) > > The problem with this is that it is python based and it could be too > much for some of the "smaller" users. > Now that rtslib and high level shell support is starting to appear in upstream distros, it really should be the preferred method for the vast majority of people, even for smaller cases. At least for a quickstart, this should be focused on using modern userspace with rtsadmin shell examples for /$FABRIC along with /var/target/fabric/$FABRIC.spec from the wiki (see Tcm_loop/RTSadmin entry, et al.). Adding some rtslib examples would also be useful, and here is one using python objects for registering an storage object backend -> exporting as a LUN on specific loopback endpoint. IMHO, nicer than using direct configfs calls, and note that rtslib is actually fabric future proof so that a new $FABRIC.spec (say one generated for a new tcm_mod_builder.py jerbek skeleton) be used without modification of code. --nab #!/usr/bin/python import rtslib import rtslib.tcm as tcm # Setup a IBLOCk backstore using rtslib backstore = tcm.IBlockBackstore(0, mode='create') try: so = tcm.IBlockStorageObject(backstore, "sdc", "/dev/sdc", True) except Exception, exception: backstore.delete() raise exception fabric = rtslib.FabricModule('loopback') print("Creating a new lookback endpoint") target = rtslib.Target(fabric, "naa.60014055ea427a44") tpg = rtslib.TPG(target, 1) # Setup LUN=0 from 'so' StorageObject class print("Creating TPG LUN=0 for so as my_lun") lun0 = tpg.lun(0, so, "my_lun") -- 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