Jump to content

New install, all user shares disappeared


rramstad

Recommended Posts

Hi, this is really odd, but makes me very paranoid about going forward with unraid.

 

I started setting up unraid 6.9.2 today.

 

I have a pair of SSD that are being used as a cache pool, and two large hard drives.

 

The system was configured with a few default user shares, and I left them alone.

 

I had no trouble starting the parity check -- it was probably around 12% when things got weird -- and no problems formatting the one non parity hard drive and getting the cache pool up and running.

 

I started transferring data from my existing NAS via rsync.  I had set that share to cache = prefer.  After some time, the cache drives filled, and I realized this was probably not the best setting for the initial data transfer.  I changed cache = no and continued copying.  The rsync resumed where it had stopped, kind of neat, as unraid was presenting the share with the data merged together as expected.

 

Anyhow I started moving some other data to another user share, and with the first share, I mounted it successfully from other systems and was playing some music from that share.

 

After thinking about it a little bit, I realized with the cache full that this was not optimal, that data really should probably be flushed to the disk, creating the potential for the cache to be reused properly.  (I'm not sure if this was necessary or not, but that was my thinking, as the cache had 128 GB used out of 128 GB.)  So in the settings I found the way to run the mover manually, and I clicked that button.

 

Nothing happened, which seemed weird.  The usage of cache didn't change.   I then thought about it for a second and my initial guess was that because I had changed from cache = prefer to cache = no that the mover didn't know what to do.  So I changed it back to cache = prefer, and ran the mover again.

 

At that moment, all the shares disappeared, along with all my data.  In terminal, I get this:

 

root@unraid:~# ls /mnt/user
/bin/ls: cannot access '/mnt/user': Transport endpoint is not connected
 

and in the GUI there are no user shares at all -- not even the pre-made ones.

 

I am at a loss.  Thoughts?  From my end I am just floored that running the mover a couple of times after changing the cache settings could result in all of the user shares losing all their data.

 

I would not believe it if I didn't see it myself...

Link to comment

What you saw, while definitely not desirable, was predictable based on your settings.

 

1. Cache prefer means send new data written to the share to the cache drive, and when the cache drive is full (more on that in a sec) start using the array. When the mover is run, attempt to put any overflow that went to the array back on the cache. Basically, that share is set to prefer to live on the cache drive exclusively, and only go to the array when the cache doesn't have any room left.

 

2. Unraid determines where to write new data based on a bunch of settings, and when a target drive or pool gets close to filled, it relies on the minimum free setting, which needs to be set larger than the single largest file you intend to write to that share, so any particular drive doesn't get completely filled. Unraid can't know how large any specific file will be until it's fully written, so it's up to you to set a free space margin that makes sense for your use case.

 

Combine cache prefer with a floor of zero free space, and when the mover ran it filled the pool, and crashed the user share system. Filling any filesystem completely and then attempting to write more data can have unpredictable results, especially when the filesystem is layered like Unraid's user share system.

 

Good news is that the files on each specific drive are fine, it's just the user share system that lost the plot. Rebooting should bring that back.

 

To fix the issue, you need to set the share in question to cache:yes and run the mover, so it cleans out the cache drive to the array, then when that is complete set it to cache:no so further writes go straight to the array. There is no point in using the cache for initial data transfer, as you will inevitably fill it up and then have to wait for the mover. It's faster to write directly to the array so each piece of data only gets transferred once.

 

You also need to set minimum free space for the shares and pools to a reasonable figure so Unraid can appropriately allocate between disks and pools and not run completely out of space on any single volume. Such is the downside of individual filesystems that allow differential spindowns and isolated drive recovery as opposed to traditional RAID.

 

I recommend turning on the help in the Unraid GUI with the question mark, that will expand out the help text that explains share settings in more detail.

 

 

Link to comment
1 hour ago, JonathanM said:

You also need to set minimum free space for the shares and pools to a reasonable figure so Unraid can appropriately allocate between disks and pools and not run completely out of space on any single volume. Such is the downside of individual filesystems that allow differential spindowns and isolated drive recovery as opposed to traditional RAID.

 

Could you tell me where to find these settings and what typical values might be?

 

I follow what you are saying and I understand the overall concepts.  I did restart the system -- having shut it down in frustration -- and after starting the array again, I see the user shares, and there was no data loss, though this has been terrifying.

 

Big picture, as someone with a lot of experience, it feels to me like maybe the Quick Start materials are possibly oversimplified, or maybe some defaults aren't appropriate i.e. seems like having minimum free space of zero is not a good thing, and yet it seems that was the default.

 

Also I suspect my use case -- getting my Unraid box up and immediately putting a few TB of data on it -- is probably pretty common, and if it had been suggested to start with cache: no, I would have done that, and probably avoided all this mishegoss.

 

Thank you for the help, and in advance for making a stab at a reasonable free value.  5% or 10% of the size of the pool, or maybe something like 5x the biggest normal file?  What's reasonable?

Link to comment
12 hours ago, rramstad said:

Could you tell me where to find these settings and what typical values might be?

Click on a share name in the shares tab to access share settings.  Here are mine for the Videos share:

image.thumb.png.c519ee7a5ab69a83a0bfbb6edd020432.png

I have minimum free set to 20GB because I rarely have a video file that is that large.  That's the usual rule of thumb on minimum free space.  What is the largest file size you expect you will write to a particular share and then go a little bigger.

Edited by Hoopster
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.

×
×
  • Create New...