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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    CIFS mounts don't reconnect

    Support
    cifs
    4
    8
    502
    Loading More Posts
    • 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.
    • imc67
      imc67 translator last edited by girish

      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?
      nebulon 1 Reply Last reply Reply Quote 0
      • nebulon
        nebulon Staff @imc67 last edited by

        @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?

        BrutalBirdie 1 Reply Last reply Reply Quote 1
        • BrutalBirdie
          BrutalBirdie Staff @nebulon last edited by 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?

          Like my work? Consider donating a beer 🍻 Cheers!

          nebulon 1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff @BrutalBirdie last edited by

            @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

            BrutalBirdie 1 Reply Last reply Reply Quote 3
            • BrutalBirdie
              BrutalBirdie Staff @nebulon last edited by

              @nebulon wtf

              Like my work? Consider donating a beer 🍻 Cheers!

              1 Reply Last reply Reply Quote 1
              • girish
                girish Staff last edited by

                @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.

                imc67 1 Reply Last reply Reply Quote 2
                • imc67
                  imc67 translator @girish last edited by

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

                  nebulon 1 Reply Last reply Reply Quote 0
                  • nebulon
                    nebulon Staff @imc67 last edited by

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

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    Powered by NodeBB