It seems that the recently dx uploaded files does not show up on /mnt/project until I re-start the whole Jupyter Lab VM

Brenton Pyle DNAnexus Team

Comments

7 comments

  • Comment author
    Ondrej Klempir DNAnexus Team

    Yes, I have the same understanding.

     

    The filesystem mounted with dxfuse is "static" and does not update automatically. Therefore, it is a "reflection" of the project at the time when the JupyterLab app (and dxfuse in it) was started.

     

    In order to "refresh" the data, the project needs to be "unmounted" and "mounted" back again. This can be done with the following commands:

     

    $ umount /mnt

    $ mkdir -p /mnt

    $ /home/dnanexus/dxfuse -readOnly /mnt /home/dnanexus/.dxfuse_manifest.json

     

    0
  • @Ondrej Klempir? that solution didn't work for me, please see the attached image. Am I missing something?

     

    imageimage.png

    0
  • Comment author
    Ondrej Klempir DNAnexus Team

    If manifest.json is not present on the path, I would try to create one:

     

    # Create a manifest file for dxfuse

    echo "{

         \"files\" : [],

         \"directories\" : [

            {

             \"proj_id\" : \"$DX_PROJECT_CONTEXT_ID\",

             \"folder\" : \"/\",

             \"dirname\" : \"/project\"

            }

         ]

       }" > .dxfuse_manifest.json

    0
  • Comment author
    Former User of DNAx Community_57

    Hi,

     

    This answer is very helpful. I was wondering if anything similar is possible in RStudio. When I try to run `umount /mnt` in the terminal, I get:

     

    "umount: /mnt: umount failed: Operation not permitted."

    0
  • Comment author
    Alexandra Lee DNAnexus Team

    Hi Rosemary,

     

    Unfortunately it appears that `umount` doesn't work in the terminal in RStudio, as you've found. Thank you for bringing this to our attention - we will make a note of this and work to address this in the future.

     

    For now, one possible work around is to use the terminal in the JupyterLab workstation where you can also use an R notebook.

     

     

    0
  • Comment author
    Former User of DNAx Community_57

    Thanks!

    0
  • Comment author
    Dan Gealow
    • Edited

    It's now possible to refresh the mount in a Posit/Rstudio session with the following commands (h/t Hoang on email support):

    # Set the parameters:
    FUSE_MOUNT="/mnt"
    MANIFEST_FILE="/home/dnanexus/.dxfuse_manifest.json"
    
    # Unmount the project:
    sudo umount $FUSE_MOUNT
    
    # Restart dxfuse:
    sudo -E /home/dnanexus/dxfuse -readOnly $FUSE_MOUNT $MANIFEST_FILE

    or if you want a one-liner:

    sudo umount /mnt; sudo -E /home/dnanexus/dxfuse -readOnly /mnt /home/dnanexus/.dxfuse_manifest.json

    (Make sure you're not currently in the `/mnt` directory when you try to unmount it.)

    1

Please sign in to leave a comment.