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. CIFS mounts don't reconnect

CIFS mounts don't reconnect

Scheduled Pinned Locked Moved Support
cifs
8 Posts 4 Posters 2.1k Views 5 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.
    • imc67I Offline
      imc67I Offline
      imc67
      translator
      wrote on last edited by girish
      #1

      For some reason the CIFS mounts of Volumes and backups get disconnected sometimes but it seems there is no automatic discovery of this disconnect and an automatic reconnect. There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.

      Question:

      1. how to reconnect manually?
      2. is it feasible to auto-discover a disconnect and reconnect?
      nebulonN 1 Reply Last reply
      0
      • imc67I imc67

        For some reason the CIFS mounts of Volumes and backups get disconnected sometimes but it seems there is no automatic discovery of this disconnect and an automatic reconnect. There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.

        Question:

        1. how to reconnect manually?
        2. is it feasible to auto-discover a disconnect and reconnect?
        nebulonN Offline
        nebulonN Offline
        nebulon
        Staff
        wrote on last edited by
        #2

        @imc67 I was also debugging a backup issue with cifs. The problem there is, that is it quite hard to figure out if the mountpoint went bad. Essentially sometimes read operations work, maybe because still in cache or for other reasons, but then a link creation will fail. I am still trying to figure out how to determine the proper state of such mount points in order to improve the Cloudron logic dealing with them. Do we have some cifs experts here on how to debug such rather random failures?

        BrutalBirdieB 1 Reply Last reply
        1
        • nebulonN nebulon

          @imc67 I was also debugging a backup issue with cifs. The problem there is, that is it quite hard to figure out if the mountpoint went bad. Essentially sometimes read operations work, maybe because still in cache or for other reasons, but then a link creation will fail. I am still trying to figure out how to determine the proper state of such mount points in order to improve the Cloudron logic dealing with them. Do we have some cifs experts here on how to debug such rather random failures?

          BrutalBirdieB Offline
          BrutalBirdieB Offline
          BrutalBirdie
          Partner
          wrote on last edited by BrutalBirdie
          #3

          @nebulon

          https://checkmk.com/integrations/cifsmounts

          stat -f  /mnt/cloudronbackup/
          File: "/mnt/cloudronbackup/"
          ID: 4f634e9e00000000 Namelen: 255     Type: smb2
          Block size: 1024       Fundamental block size: 1024
          Blocks: Total: 471125220  Free: 250861330  Available: 250861330
          Inodes: Total: 0          Free: 0
          

          This returns:

          echo $?
          0
          

          Now I simulate an CIFS outage by just disabling CIFS.

          stat -f  /mnt/cloudronbackup/
          stat: cannot read file system information for '/mnt/cloudronbackup/': Key has been revoked
          

          This returns:

          echo $?
          1
          

          Maybe we can use this?

          Like my work? Consider donating a drink. Cheers!

          nebulonN 1 Reply Last reply
          0
          • BrutalBirdieB BrutalBirdie

            @nebulon

            https://checkmk.com/integrations/cifsmounts

            stat -f  /mnt/cloudronbackup/
            File: "/mnt/cloudronbackup/"
            ID: 4f634e9e00000000 Namelen: 255     Type: smb2
            Block size: 1024       Fundamental block size: 1024
            Blocks: Total: 471125220  Free: 250861330  Available: 250861330
            Inodes: Total: 0          Free: 0
            

            This returns:

            echo $?
            0
            

            Now I simulate an CIFS outage by just disabling CIFS.

            stat -f  /mnt/cloudronbackup/
            stat: cannot read file system information for '/mnt/cloudronbackup/': Key has been revoked
            

            This returns:

            echo $?
            1
            

            Maybe we can use this?

            nebulonN Offline
            nebulonN Offline
            nebulon
            Staff
            wrote on last edited by
            #4

            @brutalbirdie yeah I thought so as well, but I am currently debugging a storage where this leads to:

            root:~# stat -f  /mnt/cloudronbackup/
              File: "/mnt/cloudronbackup/"
                ID: f19c4e9e00000000 Namelen: 255     Type: smb2
            Block size: 1024       Fundamental block size: 1024
            Blocks: Total: 524288000  Free: 426313712  Available: 426313712
            Inodes: Total: 0          Free: 0
            root:~# echo $?
            0
            root:~# 
            

            All read and most write commands work, however not all 😕 They will work fine after a remount

            BrutalBirdieB 1 Reply Last reply
            3
            • nebulonN nebulon

              @brutalbirdie yeah I thought so as well, but I am currently debugging a storage where this leads to:

              root:~# stat -f  /mnt/cloudronbackup/
                File: "/mnt/cloudronbackup/"
                  ID: f19c4e9e00000000 Namelen: 255     Type: smb2
              Block size: 1024       Fundamental block size: 1024
              Blocks: Total: 524288000  Free: 426313712  Available: 426313712
              Inodes: Total: 0          Free: 0
              root:~# echo $?
              0
              root:~# 
              

              All read and most write commands work, however not all 😕 They will work fine after a remount

              BrutalBirdieB Offline
              BrutalBirdieB Offline
              BrutalBirdie
              Partner
              wrote on last edited by
              #5

              @nebulon wtf

              Like my work? Consider donating a drink. Cheers!

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

                @imc67 said in CIFS mounts don't reconnect:

                There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.

                @nebulon If a person can figure manually that it is not mounted, why can we not figure out in code that it is not mounted ?

                We can always put some cron timer for CIFS mounts to check if it's mounted and if not re-mount (i.e based on your answer for above). Ideally, this should of course come from the CIFS driver.

                imc67I 1 Reply Last reply
                2
                • girishG girish

                  @imc67 said in CIFS mounts don't reconnect:

                  There is also no button in the GUI to reconnect, worse the mount "icon" is Green but that's not correct regarding the connection.

                  @nebulon If a person can figure manually that it is not mounted, why can we not figure out in code that it is not mounted ?

                  We can always put some cron timer for CIFS mounts to check if it's mounted and if not re-mount (i.e based on your answer for above). Ideally, this should of course come from the CIFS driver.

                  imc67I Offline
                  imc67I Offline
                  imc67
                  translator
                  wrote on last edited by
                  #7

                  @girish @nebulon is there in the meanwhile a workaround to re-connect the CIFS mount for the Volumes?

                  nebulonN 1 Reply Last reply
                  0
                  • imc67I imc67

                    @girish @nebulon is there in the meanwhile a workaround to re-connect the CIFS mount for the Volumes?

                    nebulonN Offline
                    nebulonN Offline
                    nebulon
                    Staff
                    wrote on last edited by
                    #8

                    @imc67 currently only via SSH, so umount the device and then run systemctl restart <mountpointunit.mount>

                    1 Reply Last reply
                    1
                    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