This repository has been archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Humble Chirammal <[email protected]>
- Loading branch information
Showing
4 changed files
with
104 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,68 @@ | ||
# CSI Hostpath driver | ||
|
||
## Usage: | ||
## Usage | ||
|
||
### Build hostpathplugin | ||
``` | ||
$ make hostpath | ||
|
||
```bash | ||
make hostpath | ||
``` | ||
|
||
### Start Hostpath driver | ||
``` | ||
$ sudo ./_output/hostpathplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 | ||
|
||
```bash | ||
sudo ./_output/hostpathplugin --endpoint tcp://127.0.0.1:10000 --nodeid CSINode -v=5 | ||
``` | ||
|
||
### Test using csc | ||
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc | ||
|
||
Get ```csc``` tool from <https://github.com/rexray/gocsi/tree/master/csc> | ||
|
||
#### Get plugin info | ||
``` | ||
|
||
```bash | ||
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000 | ||
"csi-hostpath" "0.1.0" | ||
``` | ||
|
||
#### Create a volume | ||
``` | ||
|
||
```bash | ||
$ csc controller new --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeName | ||
CSIVolumeID | ||
``` | ||
|
||
#### Delete a volume | ||
``` | ||
|
||
```bash | ||
$ csc controller del --endpoint tcp://127.0.0.1:10000 CSIVolumeID | ||
CSIVolumeID | ||
``` | ||
|
||
#### Validate volume capabilities | ||
``` | ||
|
||
```bash | ||
$ csc controller validate-volume-capabilities --endpoint tcp://127.0.0.1:10000 --cap 1,block CSIVolumeID | ||
CSIVolumeID true | ||
``` | ||
|
||
#### NodePublish a volume | ||
``` | ||
|
||
```bash | ||
$ csc node publish --endpoint tcp://127.0.0.1:10000 --cap 1,block --target-path /mnt/hostpath CSIVolumeID | ||
CSIVolumeID | ||
``` | ||
|
||
#### NodeUnpublish a volume | ||
``` | ||
|
||
```bash | ||
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/hostpath CSIVolumeID | ||
CSIVolumeID | ||
``` | ||
|
||
#### Get NodeID | ||
``` | ||
|
||
```bash | ||
$ csc node get-id --endpoint tcp://127.0.0.1:10000 | ||
CSINode | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,44 @@ | ||
# CSI ISCSI driver | ||
|
||
## Usage: | ||
## Usage | ||
|
||
### Start ISCSI driver | ||
``` | ||
$ sudo ./_output/iscsidriver --endpoint tcp://127.0.0.1:10000 --nodeid CSINode | ||
|
||
```bash | ||
sudo ./_output/iscsidriver --endpoint tcp://127.0.0.1:10000 --nodeid CSINode | ||
``` | ||
|
||
### Test using csc | ||
Get ```csc``` tool from https://github.com/rexray/gocsi/tree/master/csc | ||
|
||
Get ```csc``` tool from <https://github.com/rexray/gocsi/tree/master/csc> | ||
|
||
#### Get plugin info | ||
``` | ||
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000 | ||
"ISCSI" "0.1.0" | ||
|
||
```bash | ||
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 | ||
|
||
```bash | ||
|
||
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 | ||
|
||
```bash | ||
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 | ||
|
||
```bash | ||
csc node get-id --endpoint tcp://127.0.0.1:10000 | ||
CSINode | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters