Mounting CIFS Shares into VKS Containers Fails
search cancel

Mounting CIFS Shares into VKS Containers Fails

book

Article ID: 437302

calendar_today

Updated On:

Products

VMware vSphere Kubernetes Service

Issue/Introduction

  • Unable to mount CIFS shares on VKS worker nodes.
  • You may receive a generic error message such as:
    root [ ~ ]# mount -v -t cifs -o vers=3.0,domain=ent,username=user //##.##.##.##/path /root/mnt/
    mount: /root/mnt: cannot mount //##.##.##.##/path read-only.
           dmesg(1) may have more information after failed mount system call.
    

Environment

VKS Guest Cluster

Cause

  • cifs-utils is required to mount the shares properly.
  • Guest cluster worker nodes (Tanzu Kubernetes Grid nodes) are based on a minimal Photon OS image that does not include the cifs-utils package by default. 
  • To confirm on a guest cluster node, you can run which mount.cifs. If it returns nothing, the package is missing.

 

Resolution

The best way to enable the cifs-utils package for a guest cluster is to build a custom image that includes the package you need. Once you've validated that you have a working configuration, this will prevent the package from being removed during reboots, which will happen if you manually install the package due to the immutable nature of the nodes.