WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / Cloud Native / Quick Tip - How to mount CIFS & NFS volumes on Photon OS?

Quick Tip - How to mount CIFS & NFS volumes on Photon OS?

01.13.2016 by William Lam // 9 Comments

I caught the following tweet from Christian this morning and thought I do a quick blog post on how to mount an external volume like a CIFS or NFS share on VMware's Photon OS.

Hm, anyone tried to get CIFS mount-points
in Photon?

— Christian Mohn™ (@h0bbel) January 12, 2016

For mounting an NFS volume, an NFS client is required and this is provided through the nfs-utils package which is not installed by default on Photon OS. To install the package, you just simply need to run the following command:

tdnf -y install nfs-utils cifs-utils

Screen Shot 2016-01-13 at 8.47.11 AM
Once the nfs-utils is installed, you can mount your NFS volume by using the mount command like the following:

mount -t nfs [NFS-SERVER]:/path/to/share /mountpoint

If you want to ensure the volume is automatically mounted, you will need to add an entry to /etc/fstab. If you want more details, you can perform a quick Google search for further instructions

For mounting a CIFS or SMB volume, you need to install cifs-utils package and then specify the "cifs" mount type like the following:

mount -t cifs //[CIFS-SERVER]//path/to/share /mountpoint

If you require authentication to your CIFS or SMB volume, you just need to specify -o username=[USERNAME],password=[PASSWORD]

Lastly, I also want to mention that the instructions above is not specific to Photon OS but applies to any other *Nix platform.

More from my site

  • How to update AppCatalyst's default PhotonOS VM template w/Docker 1.9?
  • NFS Multi-Connections in vSphere 8.0 Update 1
  • Cluster API BYOH Provider on Photon OS (Arm) with Tanzu Community Edition (TCE) and ESXi-Arm
  • Packer reference for PhotonOS Arm NFS Virtual Appliance using OVF properties for ESXi-Arm
  • How to manually install Folding @ Home on VMware Photon OS?

Categories // Cloud Native Tags // cifs, mount, nfs, nfs-utils, Photon, tdnf

Comments

  1. *protectedErik says

    07/30/2016 at 9:55 am

    Hi there!

    I have been able to mount a nfs share successfully thanks to your blog article. Thank you for that.
    But I am unable to unmount the nfs share I've mounted before because the command unmount does not exist. Is there a way to remove the mount with a different command?

    Reply
  2. *protectedErick says

    04/05/2017 at 7:47 am

    Hello,
    i'm using the latest photon version and i'm getting the following error:

    Failed to start rpc-statd.service: Unit rpc-statd.service failed to load: No such file or directory.
    mount.nfs: rpc.statd is not running but is required for remote locking.
    mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
    mount.nfs: an incorrect mount option was specified

    tried doing tdnf statd ..there's no package available .

    Would appreciate your help.
    Thanks!

    Reply
  3. *protectedSteve Bristow says

    09/07/2020 at 9:06 am

    Hi William - would you mind updating this post for Photon OS 3.0, which actually does NOT natively include the CIFS helper:

    tdnf install -y cifs-utils is required - and suddenly all problems melt away!

    Reply
    • William Lam says

      09/08/2020 at 5:21 am

      Updated

      Reply
      • *protectedSteve Bristow says

        09/14/2020 at 12:25 am

        Thank you, William. For this - and for everything else 🙂

        Reply
  4. *protectedTamás Szalai says

    02/16/2021 at 8:53 am

    Thank you for this article. Unfortunately, it helps me only half.
    We have 2 vcsa running here and on one machine there are no problems with SMB mounts, the cifs kernel module is loaded and all is well. On the other machine I installed the cifs-utils package via tdnf, but the kernel module is not loaded and thus no mount to an SMB share is possible.

    What am I doing wrong? What else can I try?

    Reply
    • *protectedTamás Szalai says

      02/17/2021 at 12:46 am

      Hahaha ... I managed to do it myself. I actually only had to do a mount on the command line. But that was only possible after a reboot.

      Reply
  5. *protectedlknite says

    12/17/2023 at 7:22 am

    William,
    I have tanzu setup and would like to connect to an nfs share. I tried the technique above but it hangs right away:
    ```
    vmware-system-user@root-worker-ls65g-6d97998b66-787cm [ /etc/yum.repos.d ]$ sudo tdnf search wireguard
    Refreshing metadata for: 'VMware Photon Extras 3.0 (x86_64)'
    retrying 1/10
    ```
    I can do 'curl https://www.google.com' from there so I know connectivity is good. Is there a trick to get the install to work on a tanzu workernode?

    Reply
    • *protectedlknite says

      12/17/2023 at 9:27 pm

      I realized nfs was already available as the 'nfs' type (it wasn't working for other reasons, but I got it to work), but would also like to enable wireguard module, so question still stands.

      Reply

Thanks for the comment!Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...