NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

chopin70's avatar
chopin70
Virtuoso
Jul 14, 2015

Share locked: unable to delete it

I have a share named "torrents".
Under "/data/._share" folder it was named "Torrents".

I wanted to clean old leftover shares under /data/._share
I deleted from windows explorer the /data/._share/Torrents folder

Realizing that it affected my actual share, I wanted to save it.
I went into SSH and did this:

mv /data/torrents /data/torrents.bak


Then deleted torrents share from the GUI and created a new share called "torrents"

Now, the new created "torrents" share, still shows the old snapshots as if they existed, but I cannot delete or recover them

I also cannot delete the share from GUI

code error:

Share 'torrents' cannot be delete. Try it again later.
error code: 1004030000


Under SSH, I tried to empty it, rmdir the "torrents" folder..., no way: "Operation not permitted"
Under SSH, I also see the "torrents.bak" folder, but I cannot delete it even that I deleted all its contents after I did a backup to PC: error folder not empty, despite ls -a shows no entries

Now, I am screwed with a share named "torrents" and containing dummy snapshots that I cannot delete. Under SSH, there is also that "torrents.bak" folder, empty and that I cannot delete. I tried to reboot the NAS many times, no fix. I also tried chmod and chown on the folders, no way

I see there is no volume scan now available by the way.

Please help me fix this mess

9 Replies

Replies have been turned off for this discussion
  • Thanks mdgm for all the support through PM

    To others: I ended with a factory reset as there were other issues maybe caused by all my steps. No data loss as the NAS is in sync with an external HDD

    So, when logged in as admin, extra care must be taken with the shares config files!
  • I get well that creating a share is not just like a folder...
    Anyway, hope you get what I meant.

    In fact, I have this in .purge: /data/.purge/1436915898_torrents

    Can I manually delete it from /data/.purge or there are more things I should consider?
  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    There are are no snapshots for the torrents share left.

    Your other three shares have snapshots.

    It looks like the old share is stuck in the purge.

    1. There's more to creating a share than simply creating a directory.
  • I also like to have the access through admin credentials. I have a script scheduled to backup these folders. However, that day, I decided to manually clean up things. There were 2 bugs:

    - minor: the shares don't seem to be case sensitive. Latest firmware even doesn't allow to rename a share by only changing the casing. I guess this is needed for windows and maybe DLNA compatibility, so not really a bug.

    - inadvertently deleting the share config under /data/._share ends up in a hard to recover state.

    Fixes I see:
    1- Allow creation of a share when the folder already exists under /data AND when there is no config for that share under /data/._share AND when it is not a hidden folder staring with "."
    A prompt could warn the user that he will recover the existing share contents when creating it. I find it a safe alternative!

    2- On reboot, the share for which the /data/._share folder was removed should be unlocked in SSH
  • StephenB's avatar
    StephenB
    Guru - Experienced User
    I think it is a good thing that these folders can be accessed from Windows, and I wouldn't want a bug "fix" that simply blocked that access.
    - they were accessible from Windows only because you are using admin credentials.
    - ._share is a hidden folder, which should have been a huge red flag.

    Though I routinely use admin credentials from my various PCs, Netgear generally doesn't suggest it.
  • Logs sent

    The first error I did was to delete inadvertently the "\\RNDU2000-1\data\._share\Torrents" from windows explorer.

    When I created the share a few months ago, I named it first "Torrents", and later renamed it "torrents". Yesterday, I forgot about that and since linux is case sensitive, I thought it was safe to delete "Torrents" folder. Basically, it seems when I renamed the share in GUI, it didn't modify the casing in the root file system! I cannot reproduce the issue now, maybe because of a firmware update that doesn't permit renaming the share if I only modify the casing.

    Also, I didn't delete it from the SSH console. The /data/._share is accessible from PC and it is from there that I deleted it.

    The issue can happen to anyone, no need to SSH enabled. By inadvertently deleting "/data/._share/Folder" through windows explorer, the share is lost. To recover it, we need either a backup of the deleted folder followed by a reboot or through the steps I described above.

    Hope you can consider it as a potential bug, since I don't expect to be locked this way by deleting an accessible folder in windows explorer
  • mdgm-ntgr's avatar
    mdgm-ntgr
    NETGEAR Employee Retired
    Send me your logs (see the Sending Logs link in my sig) and I should be able to tell if the snapshots are still there.

    We don't expect such steps as you took to be taken via SSH.
  • mdgm wrote:
    Sent you a PM


    thank you for caring to direct support

    During the night, I "think" I could fix issues this way:

    1- SSH console:
    mv /data/torrents /data/torrents.1


    2- NAS GUI:
    - create a share folder called "torrents"

    3- Windows network access:
    - backup to PC "/data/._share/torrents" folder

    4- NAS GUI:
    - delete the "torrents" share

    5- in windows network access:
    - delete "/data/._share/torrents" from NAS if it still exists

    6- SSH console:
    mv /data/torrents.1 /data/torrents


    7- in windows network access:
    - restore "/data/._share/torrents" from PC to NAS

    8- reboot the NAS

    9- delete the "torrents" share that appears again from the GUI


    I repeated the above steps for every "locked old share folder" I had.

    * Please, let me know if you still need the info sent by PM or if the above procedure I did seems clean
    * Also, is there a simpler way to force deleting shared folders when they are locked after my error in post 1?
    * The used space seems lower now than before. I wonder if the snapshots are still lying as lost folders / files somewhere?

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More