Browse code

Add fibre channel guide

Signed-off-by: Huamin Chen <hchen@redhat.com>

Huamin Chen authored on 2015/09/18 05:32:31
Showing 4 changed files
... ...
@@ -41,6 +41,7 @@ OpenShift expects that storage volumes are provisioned by system administrator o
41 41
 
42 42
 * [NFS](nfs/README.md)
43 43
 * [OpenStack Cinder](cinder/README.md)
44
+- [Fibre Channel](fc/README.md)
44 45
 
45 46
 ## Persistent Volumes Claims
46 47
 Now that the "system admin" guy has deployed some Persistent Volumes, you can continue as an application developer and actually use these volumes to store some MySQL and Wordpress data. From now on, the guide does not depend on the underlying storage technology!
47 48
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+# How To Use Fibre Channel Persistent Volumes
1
+
2
+The purpose of this guide is to create Persistent Volumes with Fibre Channel. It is part of [OpenShift persistent storage guide](../README.md), which explains how to use these Persistent Volumes as data storage for applications.
3
+
4
+## Setting up Fibre Channel Target
5
+
6
+On your FC SAN Zone manager, allocate and mask LUNs so Kubernetes hosts can access them.
7
+
8
+## Creating the PV with Fibre Channel persistent storage
9
+
10
+In the *fc* volume, you need to provide *targetWWNs* (array of Fibre Channel target's World Wide Names), *lun*,  *fsType* that designates the filesystem type that has been created on the lun, and *readOnly* boolean.
11
+
12
+## Fibre Channel Persistent Volumes
13
+
14
+Each Fibre Channel Volume becomes its own Persistent Volume in the cluster.
15
+
16
+```
17
+# Create the persistent volumes for Fibre Channel.
18
+$ oc create -f examples/wordpress/fc/pv-1.yaml
19
+$ oc create -f examples/wordpress/fc/pv-2.yaml
20
+$ oc get pv
21
+
22
+NAME      LABELS    CAPACITY   ACCESSMODES   STATUS      CLAIM     REASON    AGE
23
+pv0001    <none>    1Gi        RWO           Available                       2m
24
+pv0002    <none>    1Gi        ROX           Available                       5s
25
+
26
+```
27
+
28
+Now the volumes are ready to be used by applications in the cluster.
0 29
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+apiVersion: v1
1
+kind: PersistentVolume
2
+metadata:
3
+  name: pv0001
4
+spec:
5
+  capacity:
6
+    storage: 1Gi
7
+  accessModes:
8
+    - ReadWriteOnce
9
+  fc:
10
+    targetWWNs: ['500a0981891b8dc5', '500a0981991b8dc5']
11
+    lun: 6
12
+    fsType: ext4
0 13
new file mode 100644
... ...
@@ -0,0 +1,13 @@
0
+apiVersion: v1
1
+kind: PersistentVolume
2
+metadata:
3
+  name: pv0002
4
+spec:
5
+  capacity:
6
+    storage: 1Gi
7
+  accessModes:
8
+    - ReadOnlyMany
9
+  fc:
10
+    targetWWNs: ['500a0981891b8dc5', '500a0981991b8dc5']
11
+    lun: 2
12
+    fsType: ext4