IBM Support

Accessing Windows File Server as storage volume on CP4D

Question & Answer


Question

My organization has several Windows File Servers. How to access these Windows shared folders as storage volume on CP4D?
image-20230615082208-1

Answer

Cloud Pak for Data documentation has explanation about how to managing storage volumes, and also how to enabled users to connect to external SMB storage volumes. Following is sample steps to access Windows File Server as storage volume on CP4D cluster.
1. Confirm that the sharing folder set correctly in Windows server.
image-20230615083631-1
2. Install SMB CSI driver v1.11.0 version.
# curl -skSL https://raw.githubusercontent.com/kubernetes-csi/csi-driver-smb/v1.11.0/deploy/install-driver.sh | bash -s v1.11.0 --
Installing SMB CSI driver, version: v1.11.0 ...
3. Check pods status.
# kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-controller
NAME                                 READY   STATUS    RESTARTS          AGE   IP             NODE                              NOMINATED NODE   READINESS GATES
csi-smb-controller-c7ffbcd47-kmzmm   3/3     Running   100 (7h52m ago)   9d    192.168.26.145   master2.cp4d-hx.cp.mytest.org   <none>           <none>

# kubectl -n kube-system get pod -o wide --watch -l app=csi-smb-node
NAME                 READY   STATUS    RESTARTS   AGE   IP             NODE                              NOMINATED NODE   READINESS GATES
csi-smb-node-7pppp   3/3     Running   0          9d    192.168.26.145   master2.cp4d-hx.cp.mytest.org   <none>           <none>
csi-smb-node-ftkt7   3/3     Running   0          9d    192.168.28.147   worker1.cp4d-hx.cp.mytest.org   <none>           <none>
csi-smb-node-gfvhz   3/3     Running   0          9d    192.168.25.144   master1.cp4d-hx.cp.mytest.org   <none>           <none>
csi-smb-node-r9nbf   3/3     Running   0          9d    192.168.27.146   worker0.cp4d-hx.cp.mytest.org   <none>           <none>
csi-smb-node-tltzt   3/3     Running   0          9d    192.168.24.143   master0.cp4d-hx.cp.mytest.org   <none>           <none>
csi-smb-node-zfmcj   3/3     Running   0          9d    192.168.29.148   worker2.cp4d-hx.cp.mytest.org   <none>           <none>
4. Create the required cluster role and cluster role binding for the meta-api.
# cat <<EOF | oc apply -f -
> ---
> apiVersion: rbac.authorization.k8s.io/v1
> kind: ClusterRole
> metadata:
>   # "namespace" omitted. ClusterRoles are not scoped to a namespace.
>   name: ibm-zen-volumes-cluster-role
> rules:
> - apiGroups: [""]
>   #
>   # at the HTTP level, the name of the resource for accessing Secret
>   # objects is "secrets"
>   resources: ["persistentvolumes"]
>   verbs: ["create", "get", "list", "patch", "update", "watch", "delete", "use"]
> ---
> apiVersion: rbac.authorization.k8s.io/v1
> kind: ClusterRoleBinding
> metadata:
>   name: ibm-zen-volumes-cluster-role-binding
> subjects:
> - kind: ServiceAccount
>   name: ibm-zen-operator-serviceaccount
>   namespace: ibm-common-services    # The namespace where the IBM Cloud Pak foundational services are installed
> roleRef:
>   apiGroup: rbac.authorization.k8s.io
>   kind: ClusterRole
>   name: ibm-zen-volumes-cluster-role
> EOF
clusterrole.rbac.authorization.k8s.io/ibm-zen-volumes-cluster-role unchanged
clusterrolebinding.rbac.authorization.k8s.io/ibm-zen-volumes-cluster-role-binding unchanged
5. From CP4D UI, add storage volumes.
image-20230615085741-1
6. Confirm that the storage volume is running
image-20230615090013-2
7. On projects and deployment spaces, create connection to storage volumes.
image-20230615090207-3
8. Confirm that there is no problem to read and write to Samba storage volumes from python code.
image-20230615090409-4
9. Confirm the output file created in Windows server.
image-20230615090548-5

[{"Type":"MASTER","Line of Business":{"code":"LOB10","label":"Data and AI"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSGU851","label":"IBM Watson Studio for IBM Cloud Pak for Data"},"ARM Category":[{"code":"a8m3p000000UoS7AAK","label":"Installation-\u003EConfiguration"}],"ARM Case Number":"TS013319075","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
14 June 2023

UID

ibm17004131