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

37 lines
893 B
Markdown
Raw Normal View History

2018-01-09 18:57:14 +00:00
# CSI to Flexvolume adapter
## Usage:
### Start Flexvolume adapter for simple nfs flexvolume driver
```
2018-02-15 13:50:31 +00:00
$ sudo ./_output/flexadapter --endpoint tcp://127.0.0.1:10000 --drivername simplenfs --driverpath ./pkg/flexadapter/examples/simplenfs-flexdriver/driver/nfs --nodeid CSINode -v=5
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
```
2018-02-15 13:50:31 +00:00
$ csc identity plugin-info --endpoint tcp://127.0.0.1:10000
2018-01-09 18:57:14 +00:00
"simplenfs" "0.1.0"
```
#### NodePublish a volume
```
2018-02-15 13:50:31 +00:00
$ csc node publish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/nfs --attrib server=a.b.c.d --attrib share=nfs_share nfstestvol
2018-01-09 18:57:14 +00:00
nfstestvol
```
#### NodeUnpublish a volume
```
2018-02-15 13:50:31 +00:00
$ csc node unpublish --endpoint tcp://127.0.0.1:10000 --target-path /mnt/nfs nfstestvol
2018-01-09 18:57:14 +00:00
nfstestvol
```
#### Get NodeID
```
2018-02-15 13:50:31 +00:00
$ csc node get-id --endpoint tcp://127.0.0.1:10000
2018-01-09 18:57:14 +00:00
CSINode
```