ceph-csi/vendor/github.com/kubernetes-csi/drivers/pkg/iscsi/README.md

38 lines
870 B
Markdown
Raw Normal View History

2018-01-09 18:57:14 +00:00
# CSI ISCSI driver
## Usage:
### Start ISCSI driver
```
2018-02-15 13:50:31 +00:00
$ sudo ./_output/iscsidriver --endpoint tcp://127.0.0.1:10000 --nodeid CSINode
2018-01-09 18:57:14 +00:00
```
### Test using csc
2018-07-18 14:47:22 +00:00
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc
2018-01-09 18:57:14 +00:00
#### Get plugin info
```
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
"ISCSI" "0.1.0"
```
#### NodePublish a volume
```
$ export ISCSI_TARGET="iSCSI Target Server IP (Ex: 10.10.10.10)"
$ export IQN="Target IQN"
$ csc node publish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/iscsi --attrib targetPortal=$ISCSI_TARGET --attrib iqn=$IQN --attrib lun=<lun-id> iscsitestvol
iscsitestvol
```
#### NodeUnpublish a volume
```
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/iscsi iscsitestvol
iscsitestvol
```
#### Get NodeID
```
$ csc node get-id --endpoint tcp://127.0.0.1:10000
CSINode
```