[SOLVED] Cannot delete an Empty User Share (rc12)


Recommended Posts

I am tidying up my server and deleting some of my ISO disc images now that I have them as MKVs. I have emptied two user shares "VideoSD-FitnessISO" and "VideoSD-TVSeriesISO". I have checked with 'ls', midnight commander and browsing to the shares with Windows Explorer and they are empty.

 

On the unRaid web page where all shares are listed. If I click on 'Compute" it correctly shows the shares as being 0 size

 

However when I view the specific Shares in the "Shares" web page on Unraid the "Share empty?" = "No" and I am therefore unable to delete the share as there is no 'Delete' button being displayed.

 

Both of these Shares are on HDDs that have other Shares on them. i.e. the HDD has content on it in the other Shares, but the Share I am trying to delete is empty.

 

Any thoughts? Can anyone confirm if this is a bug?

 

TheWombat

Link to comment

Thanks for the suggestions. Shift-Reload made no difference.

 

I'm hoping Tom will see this post and respond and if need be I can do some further checks for him. If others have had this issue then it does indeed seem like there is a bug.

 

TheWombat

 

At the top of the file /usr/local/emhttp/plugins/webGui/ShareEdit.php there's this function:

 

/* check for empty share */
   function shareEmpty($name) {
      return (($files = @scandir('/mnt/user/' . $name)) && (count($files) <= 2));
   }

 

This checks if the share directory is empty.  I don't see how this can fail, but notice the '@' symbol in front of the scandir() function?  That turns off error reporting during the function call.  I don't recall why I did that, but you might try editing the file and removing it.  Then refresh the share page and see if PHP spits out any messages to the console.  Also you can check the share yourself by typing:

 

ls -a /mnt/user/name    [if name has no spaces]

or

ls -a "/mnt/user/share name"  [if name has spaces]

 

If you see anything besides "./" and "../" show up, share is not empty.

Link to comment

Tom,

 

I'm getting a lot of errors on the console screen about undefined constants etc. Once the preclear I am running completes I will reboot and check whether it fixes itself. I don't believe I would have done anything to cause this but who knows.

 

DSC045621280x960_zps8ac4f893.jpg

 

 

thanks and I will post an update at the weekend.

 

TheWombat

Link to comment

I have no idea what was causing the underlying issue which resulting in a lot of debug errors on the console screen about constants etc not being set.

 

I removed unmenu and all packages and rebooted and now all seems to be working fine - no more debug messages and also I can now delete empty shares.

 

I will now reinstall my packages and see if any further issues.

 

Thanks

 

TheWombat

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
Reply to this topic...

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