how to delete shares?


Recommended Posts

I recently upgraded from 4.7 to 5.0 and I would like to clean up my installation a bit.

 

About a year ago, I decided to moved my XBMC database to the unraid server and configure all my XBMC clients to use it.  At the time, it was a kludge, there was no clean way to get XBMC to use mySql on another machine so I simply created a share on the unraid server and pointed all the XBMC clients to that database.

 

Since then, XBMC has moved on to 12.2 and mySql is well-supported so I used unmenu to install the mySql package and configured it to use the database already on the server.  All was good.

 

Then I upgraded to unraid 5.0 (I want to add some 3 TB drives).  Now I have these shares which contain the database files and they don't need to be "shared" any longer.  This is because the mySql server running on the unraid server accesses the database files "locally" and all access to the database is only thru mySql.  Thus, the world does not need to see the database files and there is no need to share them.

 

The question is: how to delete the share?  My understanding of how "shares" work in unraid is rudimentary (there is really no good explanation that I have been able to find).  My thought is that they are like symbolic links: the underlying data is in the reiserfs file system and the unraid software "overlays" the share definitions and makes them accesible thru SMB.  In this model, you should be able to simply delete the share definition and the underlying files would remain untouched.  The manual says:

 

Deleting User Shares

To delete a User Share:

Move or delete the contents of the user share.

Check the Delete box next to the "Apply" button under Share Settings.

Click the Delete button.

 

So it looks like the share has to be "empty", whatever that means.  In this case, this not too bad.  I only have a few megabytes in the mysql directory.  But if I wanted to delete my enormous "Videos" share (9 TB and counting), I would really have to move all that data?  Can someone shed some light on this? 

 

Thanks.

Link to comment

Shares are mapped directly to folders in the ReiserFS system, so deleting a share is equivalent to deleting that folder and all it's contents.  UnRaid automatically creates a share for each top-level folder on each data dsk.

 

Perhaps if you told us what you wanted to happen to the intent of your urgent Videos share we can suggest a way to achieve that.

Link to comment

Shares are mapped directly to folders in the ReiserFS system, so deleting a share is equivalent to deleting that folder and all it's contents.  UnRaid automatically creates a share for each top-level folder on each data dsk.

 

Perhaps if you told us what you wanted to happen to the intent of your urgent Videos share we can suggest a way to achieve that.

 

Thanks for the reply. 

 

I guess I dont understand.  If shares are mapped directly to folder (directories), then how is that we can have a share which contains multiple directories on multiple disks?  Here is my directory hierarchy (very similar to the example given in user manual):

 

disk1

  Videos

      Movies

      TV Shows

disk2

  Videos

      Movies

      TV Shows

disk3

  Videos

      Movies

      TV Shows

disk4

  Backup1

  mysql

disk5

  Videos

      Movies

      TV Shows

disk6

  Videos

      Movies

      TV Shows

disk7

  Videos

      Movies

      TV Shows

 

Share: Videos, contains disk1,disk2,disk3,disk5,disk6,disk7

Share: Backup1 contains: disk4/Backup1

share: mysql contains: disk4/mysql

 

In the case of "Videos", the share consists of 6 folders named Videos on six disks.

In the case of "Backup1", the share consists of 1 folder named Backup1 on one disk.

 

My understanding is this:

to write a file into the "Videos" share, the unraid software (what is the official title?), using allocation rules set by me: then picks an actual disk/directory to write the file into.

 

Here are ther rules in Videos.cfg:

shareAllocator=highwater
shareSplitLevel=3
shareFloor=45000000

 

Is this how it works?  If so, then the entire "shares" hierarchy is simply an "overlay" on top of the reiserfs.  Hence, I don't see the need to delete all files (I guess in all the directories on all the disks) in order to be able to delete a "share".  In order to "forget" a share, all the unraid software would do is forget the hierarchy and leave all the underlying directories (in reiserfs).

 

As for the last, I do not actually want to delete my "Videos" share so that is academic.  I do want to delete the "mysql" share but it is not inconvenient to copy the sql database somewhere else in order to "empty" the folder.  If I did want to delete the "Videos" share whilst preserving the data in it, I would have to find a place to move ~9 TB of data!

 

Thanks again for the reply.

 

Link to comment

Every top level directory on every data disk (and cache as well) is a user share. You can't delete the share unless you delete the mysql directory. All you can do is not export the share so you don't see it on the network.

This is the easiest way to remove a share. Simply set Export to No for each protocol.
Link to comment

Every top level directory on every data disk (and cache as well) is a user share. You can't delete the share unless you delete the mysql directory. All you can do is not export the share so you don't see it on the network.

This is the easiest way to remove a share. Simply set Export to No for each protocol.

 

AHA!!!!

This explains it.  I have been puzzled as to where the "mysql" share came from. I do not remember ever creating a share called "mysql".  However, when you install the mySql packages (in unmenu), you have to fill out the Configuration Variables.  One of these is "Disk Label" ("Disk for installation and databases, e.g. disk1, disk2, etc"

 

I set this to "disk4", hence it created /disk4/mysql directory.  If every top level directory is a share, then this created the "mysql" share and it is now obvious why I cant delete it.  I would say the mySql package is malformed for unraid.  Database files are not usually globally read/write to the world.  That is the whole point of a database manager.  Database files should be private to the database manager.  The question is: should I bother to do anything about it?  I will post further questions on using mysql in unraid and maybe get some guidance.

 

Thanks.

 

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.