jupyter-notebookjupyterjupyter-labgcp-ai-platform-notebookgoogle-cloud-filestore

How to mount Cloud Filestore in GCP AI platform Jupyter notebook?


I want to mount a Cloud Filestore instance in a GCP AI Platform Jupyter notebook instance so that I don't have to upload all of my data into the notebook.

I followed the instructions at https://cloud.google.com/filestore/docs/mounting-fileshares, but get these error messages:

root@0084329abd1b:/home# mount <IP_ADDRESS>:/streams cfs
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.
root@0084329abd1b:/home# mount -o nolock <IP_ADDRESS>:/streams cfs
mount.nfs: Operation not permitted

Solution

    1. Create a Filestore instance link

    2. Crerate a Google VM instance link

    3. Create a Notebook AI instance link

    4. On the VM instance run the commands:

      sudo apt-get -y update
      sudo apt-get -y install nfs-common
      sudo mkdir test
      # fileshare remote target
      sudo mount 111.11.111.11:/fileshare test
      sudo chmod go+rw test
      echo 'This is a test' > test/testfile
      ls test 
      #testfile
      
    5. On the Notebook AI instance run the commands link:

      sudo apt-get -y update
      sudo apt-get -y install nfs-common
      sudo mkdir test
      # fileshare remote target
      sudo mount 111.11.111.11:/fileshare /test
      ls test
      #testfile
      

    You can also check link