• [6.9.0 - Beta 30] Moving a file on the cache to a share with cache off keeps it on there forever


    lp0101
    • Closed

    Say I have two user shares, a and b. a has the cache set to "yes," b has the cache set to "off."

     

    I have a file, foo, on a which is currently on the cache, and I run the following command:

    mv /mnt/user/a/foo /mnt/user/b/

    foo is instantly moved to share b, however, the file itself is still on the cache. If I check the contents of my cache drive, I see `/mnt/cache/b/foo`. Since the cache behaviour of share b is set to "no," this file is now stuck on the cache, unless I manually set b to "yes" for the cache, invoke the mover, then set it back to "no." Without this manual intervention, my cache drive would fill up endlessly.

    Is this intended behaviour, or a bug?




    User Feedback

    Recommended Comments

    15 minutes ago, itimpi said:

    This is intended behaviour.    There are some Use Cases that exploit this behavior.

    Interesting. The bug report forum probably isn't the best place to discuss this, then, but what is the recommended way to move a file from a cached share to a non-cached share? Is it recommended to first run a copy, then delete the original?

    Link to comment

    Yes, you need to use copy/delete if you want the file to end up on a different drive.    It is a quirk of the Linux implementation of the ‘mv’ where if source and target appear to be on the same mount point (/mnt/user) a rename is issued (which leaves the file on the same drive) rather than a copy/delete action.

    • Thanks 1
    Link to comment

    You can use:

    mv /mnt/user/a/foo /mnt/user0/b/

    to have it moved outside cache

    edit: will not work for mover though, but if You have something specific You could make a custom scheduled script or something

    Edited by mihu
    Link to comment


    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.
    Note: Your post will require moderator approval before it will be visible.

    Guest
    Add a comment...

    ×   Pasted as rich text.   Restore formatting

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


  • Status Definitions

     

    Open = Under consideration.

     

    Solved = The issue has been resolved.

     

    Solved version = The issue has been resolved in the indicated release version.

     

    Closed = Feedback or opinion better posted on our forum for discussion. Also for reports we cannot reproduce or need more information. In this case just add a comment and we will review it again.

     

    Retest = Please retest in latest release.


    Priority Definitions

     

    Minor = Something not working correctly.

     

    Urgent = Server crash, data loss, or other showstopper.

     

    Annoyance = Doesn't affect functionality but should be fixed.

     

    Other = Announcement or other non-issue.