From c20e0f838b8ab8ed2f803df0051efcd19cda26c2 Mon Sep 17 00:00:00 2001 From: Lei Xue Date: Fri, 7 Oct 2016 17:09:05 +0800 Subject: [PATCH] Update README.md --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.md b/README.md index 58728a4..21c4048 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,30 @@ $ ./configure $ make ``` +## How to use + +Currenty, there is lack of commands to operate the target and LU, however you can init the target/LU with config file in `~/.gotgt/config.json`, such as: + +``` +{ + "storages": [ + { + "deviceID":1000, + "path":"file:/var/tmp/disk.img", + "online":true + } + ], + "targets": { + "test-iscsi-target": { + "name": "test-iscsi-target", + "luns": {"0": 1000} + } + } +} +``` + +> Note: make sure file `/var/tmp/disk.img` is existed, you can use `dd` to create it. + ## Test You can test this with [open-iscsi](http://www.open-iscsi.com/) or [libiscsi](https://github.com/gostor/libiscsi).