diff --git a/README.md b/README.md index 607df2b..2fb289d 100644 --- a/README.md +++ b/README.md @@ -2,65 +2,38 @@ Cloud Integrated SCSI Target framework, this includes two binaries, one is `citadm` which is command line to config and control, the other is `citd` which is a target daemon. -``` -# citadm --help -Linux SCSI Target administration utility, version 0.1 -Usage: ./citadm [OPTIONS] - -Application Options: - --lld --mode target --op new --tid --targetname - add a new target with and . must not be zero. - --lld --mode target --op delete [--force] --tid - delete the specific target with . - With force option, the specific target is deleted - even if there is an activity. - --lld --mode target --op show - show all the targets. - --lld --mode target --op show --tid - show the specific target's parameters. - --lld --mode target --op update --tid --name --value - change the target parameters of the target with . - --lld --mode target --op bind --tid --initiator-address
- --lld --mode target --op bind --tid --initiator-name - enable the target to accept the specific initiators. - --lld --mode target --op unbind --tid --initiator-address
- --lld --mode target --op unbind --tid --initiator-name - disable the specific permitted initiators. - --lld --mode logicalunit --op new --tid --lun - --backing-store --bstype --bsopts --bsoflags - add a new logical unit with to the specific - target with . The logical unit is offered - to the initiators. must be block device files - (including LVM and RAID devices) or regular files. - bstype option is optional. - bsopts are specific to the bstype. - bsoflags supported options are sync and direct - (sync:direct for both). - --lld --mode logicalunit --op delete --tid --lun - delete the specific logical unit with that - the target with has. - --lld --mode account --op new --user --password - add a new account with and . - --lld --mode account --op delete --user - delete the specific account having . - --lld --mode account --op bind --tid --user [--outgoing] - add the specific account having to - the specific target with . - could be or . - If you use --outgoing option, the account will - be added as an outgoing account. - --lld --mode account --op unbind --tid --user [--outgoing] - delete the specific account having from specific - target. The --outgoing option must be added if you - delete an outgoing account. - --lld --mode lld --op start - Start the specified lld without restarting the tgtd process. - --control-port use control port - -Help Options: - --help - display this help and exit - -Report bugs via . +## Build ``` +$ mkdir $GOPATH/gotstor/ +$ cd $GOPATH/gostor/ +$ git clone https://github.com/gostor/gotgt gotgt +$ cd gotgt +$ make +``` + +## Test + +You can test this with [libiscsi](https://github.com/gostor/libiscsi). + +### build the test tool of libiscsi + +``` +$ git clone https://github.com/gostor/libiscsi +$ cd libiscsi +$ ./autogen.sh +$ ./configure +$ make +``` + +### start the gotgt daemon + +``` +$ ./citd +``` + +### begin the test + +``` +$ ./iscsi-test-cu -v iscsi://127.0.0.1:3260/iqn.test.haha/0 +```