Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Support
  3. nfs volumes gone until container reboot

nfs volumes gone until container reboot

Scheduled Pinned Locked Moved Solved Support
10 Posts 4 Posters 1.6k Views 4 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • eyecreateE Offline
    eyecreateE Offline
    eyecreate
    App Dev
    wrote on last edited by
    #1

    If my nfs server goes offline, the nfs volumes in cloudron are in a failure state(or, even if you refresh the volume in dashboard, files don't show up in container) until the containers using them are restarted. Remounting the volume in dashboard should fix any connection issues without manual restarting containers.

    1 Reply Last reply
    0
    • robiR Offline
      robiR Offline
      robi
      wrote on last edited by
      #2

      What Cloudron version?

      Conscious tech

      eyecreateE 1 Reply Last reply
      0
      • robiR robi

        What Cloudron version?

        eyecreateE Offline
        eyecreateE Offline
        eyecreate
        App Dev
        wrote on last edited by
        #3

        @robi v7.6.4

        1 Reply Last reply
        0
        • nebulonN Offline
          nebulonN Offline
          nebulon
          Staff
          wrote on last edited by
          #4

          In this case, if you remount the nfs mount and then manually restart the app via the dashboard, does it work again or do we need to actually recreate the container for the volume to work again?

          Good question overall though what should happen if a mountpoint used as a volume into an app goes bad. I guess the apps using the volume could be stopped to avoid any strange behavior.

          1 Reply Last reply
          0
          • girishG Offline
            girishG Offline
            girish
            Staff
            wrote on last edited by
            #5

            I guess this is the linux behavior. Maybe volume remount can restart the apps that use it?

            robiR 1 Reply Last reply
            0
            • girishG girish

              I guess this is the linux behavior. Maybe volume remount can restart the apps that use it?

              robiR Offline
              robiR Offline
              robi
              wrote on last edited by
              #6

              @girish said in nfs volumes gone until container reboot:

              I guess this is the linux behavior. Maybe volume remount can restart the apps that use it?

              No, there is a more graceful way to recover NFS mounts, just need to find what it is in this combination stack.

              Conscious tech

              girishG 1 Reply Last reply
              0
              • robiR robi

                @girish said in nfs volumes gone until container reboot:

                I guess this is the linux behavior. Maybe volume remount can restart the apps that use it?

                No, there is a more graceful way to recover NFS mounts, just need to find what it is in this combination stack.

                girishG Offline
                girishG Offline
                girish
                Staff
                wrote on last edited by
                #7

                @robi said in nfs volumes gone until container reboot:

                No, there is a more graceful way to recover NFS mounts

                What is it?

                robiR 1 Reply Last reply
                0
                • girishG girish

                  @robi said in nfs volumes gone until container reboot:

                  No, there is a more graceful way to recover NFS mounts

                  What is it?

                  robiR Offline
                  robiR Offline
                  robi
                  wrote on last edited by robi
                  #8

                  @girish I don't know what the code does on container start and what it doesn't do when the connection drops (NFS server goes down, then comes back). [but I can guess.. see below]

                  Is it NFS over TCP only or UDP too? Sessions have a harder time recovering than session-less connections.

                  However, if you detect that disconnection and repeat the process for when it does come back, the volume + container + app won't need a restart (which is overkill).

                  This is highly dependent on mount options (private, slave, shared) which are explained here:
                  https://unix.stackexchange.com/questions/292999/mounting-a-nfs-directory-into-host-volume-that-is-shared-with-docker

                  Ie. private mounts seem to need a restart of the container to regain connectivity, while the others do not.

                  Conscious tech

                  girishG 1 Reply Last reply
                  1
                  • robiR robi

                    @girish I don't know what the code does on container start and what it doesn't do when the connection drops (NFS server goes down, then comes back). [but I can guess.. see below]

                    Is it NFS over TCP only or UDP too? Sessions have a harder time recovering than session-less connections.

                    However, if you detect that disconnection and repeat the process for when it does come back, the volume + container + app won't need a restart (which is overkill).

                    This is highly dependent on mount options (private, slave, shared) which are explained here:
                    https://unix.stackexchange.com/questions/292999/mounting-a-nfs-directory-into-host-volume-that-is-shared-with-docker

                    Ie. private mounts seem to need a restart of the container to regain connectivity, while the others do not.

                    girishG Offline
                    girishG Offline
                    girish
                    Staff
                    wrote on last edited by
                    #9

                    @robi thanks, good idea, let me try if rslave helps.

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #10

                      I got to the bottom of this. The issue is that mountpoint -q doesn't exit if NFS hangs and because we call execSync in node, the whole dashboard hangs. I have fixed this in https://git.cloudron.io/cloudron/box/-/commit/3da3ccedcbd8962ab309c591f6ae3561e5df4f28

                      The mount propagation flags like rslave don't apply to us. They only apply for recursive/shared mounts. That's my reading of it anyway. It doesn't seem to matter in my tests.

                      1 Reply Last reply
                      1
                      • girishG girish marked this topic as a question on
                      • girishG girish has marked this topic as solved on
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Bookmarks
                      • Search