Jump to content
  • [6.12.4] [ZFS] Lost data while moving across shares/datasets.


    sabertooth
    • Urgent

      Finally took the plunge and did an upgrade to 6.12.4 from 6.11.5.

      6.11.5:

    • ZFS(RAIDZ1)
    • User shares with same names as zfs dataset with a link(inside the share) to zfs dataset.


      6.12.4:

    • Create a new pool, and add all HDDs.
    • Change primary storage for all shares to zfs pool.
    • Global Share Settings -> Permit exclusive shares.
       

      So far so good, however some shares (from within zfs pool) show Exclusive access: No
      After a reboot, things still remain the same.
     
      In order to enable exclusive share:

    • Create a new new dataset on the zfs pool.
    • Move data from old share to new share (mv source destination)
    • Delete old share.
    • Rename new share.

     
      I tested this with smaller dataset/share first before moving to dataset(s)/share(s) with hefty amount of data.

     
      And, this is when I lost data after moving.
      I should have paid attention to ZFS master plugin while it was showing no increase in dataset size even when close to 800GB data was moved.

     
      Any ideas as to what went wrong? For the first time, am now worried that other datasets might show empty.
      Also, how can one enable Exclusive access without having to go through this circus?

     




    User Feedback

    Recommended Comments



    11 hours ago, JorgeB said:

    This command would not remove a dataset, something missing from your description.


    Afraid it actually did, it worked for all of the below listed datasets:

    • /mnt/zdata/cache
    • /mnt/zdata/downloads
    • /mnt/zdata/isos
    • /mnt/zdata/media

     

    I will try to replicate this with a dummy dataset.
     

    Link to comment

    Please refer to attached screen-shot, clearly shows dummy_old share as non-exclusive and dummy as exclusive (on zdata)

    All steps are listed below:

    root@UnraidZFS:/mnt/user# mv dummy_old/* dummy/.

    root@UnraidZFS:/mnt/user# rm -rf dummy_old/

    root@UnraidZFS:/mnt/user# zfs list
    NAME                USED  AVAIL     REFER  MOUNTPOINT
    zdata              5.47T  12.6T      805G  /mnt/zdata
    zdata/dummy        1.04M  12.6T     1.04M  /mnt/zdata/dummy

    Screenshot 2023-09-05 at 09.24.55.png

    Link to comment
    5 hours ago, sabertooth said:

    dummy_old share

    If dummy_old was deleted with rm it could not have been a zfs dataset, I understood you were staring with an existing zfs dataset?

     

    You can check for yourself:
     

    zfs create zdata/dummy_old
    rm -rf /mnt/zdata/dummy_old

     

    This will fail, and the dataset will not be deleted.

    Link to comment


      Afraid it indeed was a zfs dataset since all my shares were on zfs in 6.11.5. Please remember that the share initially was created with Primary Storage set to Array containing a link to dataset with same name as the share. After migration, I did change the Primary Storage to zpool which probably explains the yellow warning symbol next to it. I suggest you try out the above listed steps.

     

     

    Link to comment
    28 minutes ago, sabertooth said:

    I suggest you try out the above listed steps.

    How, if you did not post in detail how the dummy_old share was created?

     

    You can also post the diags after the dummy_old was showing as not exclusive, those will show what the problem is.

    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.

×
×
  • Create New...