Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Too many files are currently in use?

Featured Replies

Since I can't reproduce your problem, you have to help me out to check one idea.

 

A week ago Chopeta mentioned something about 'ulimit -n'. 

Let's see if it can have any bearing on Samba.

 

Reading the man...

"The ulimit builtin is used to set the resource usage limits of the shell and any processes spawned by it."

 

So... if we change 'ulimit -n' in one shell, and then restart Samba from that same shell,

then the modified 'ulimit -n' value will apply to the newly spawned smbd daemon.

(...if that should matter)

 

Let's try it and see what happens.  Telnet to your unRAID and type the following two lines:

ulimit -n 20000
/etc/rc.d/rc.samba restart

 

Now see if your problem is still there.

 

Let me know how it goes.

 

 

  • Replies 89
  • Views 42.5k
  • Created
  • Last Reply

Since I can't reproduce your problem, you have to help me out to check one idea.

 

A week ago Chopeta mentioned something about 'ulimit -n'. 

Let's see if it can have any bearing on Samba.

 

Reading the man...

"The ulimit builtin is used to set the resource usage limits of the shell and any processes spawned by it."

 

So... if we change 'ulimit -n' in one shell, and then restart Samba from that same shell,

then the modified 'ulimit -n' value will apply to the newly spawned smbd daemon.

(...if that should matter)

 

Let's try it and see what happens.  Telnet to your unRAID and type the following two lines:

ulimit -n 20000
/etc/rc.d/rc.samba restart

 

Now see if your problem is still there.

 

Let me know how it goes.

 

 

If it does help, you can add a single line

ulimit -n 20000

to the /boot/config/ident.cfg file. 

 

config/ident.cfg is "sourced" when /etc/rc.d/rc.samba is run.  This will work even when you reboot the server, or when you stop and re-start the array.    The ident.cfg file is created/written when you change your server name or workgroup, so odds are high the added line will not be overwritten unless you make a change in one of the few parameters defined in that section of the management page.  It also does not matter what editor you use to add the line to the config/ident.cfg file.  It is automatically processed through "fromdos" when used by samba.  The new ulimit (limit of open files)  will be in effect whenever you start and stop your unRAID array. It will automatically be in effect when you reboot your server.

 

Joe L.

If it does help, you can add a single line

ulimit -n 20000

to the /boot/config/ident.cfg file.   

 

Right.

 

I don't have high hopes that it will make any difference though.

But let's see what the people with the problem will say.

 

I tried to reproduce the problem again, and I still couldn't.  Strange.

Made a folder with more than 100,000 files in it, and copied it around with windows explorer. Never failed.

 

 

If it does help, you can add a single line

ulimit -n 20000

to the /boot/config/ident.cfg file.   

 

Right.

 

I don't have high hopes that it will make any difference though.

But let's see what the people with the problem will say.

 

I tried to reproduce the problem again, and I still couldn't.  Strange.

Made a folder with more than 100,000 files in it, and copied it around with windows explorer. Never failed.

 

 

 

In my case it was something 11,000-12,000 files but totally only like 50-60MB. It was basically all small files.

 

I'm not sure if I still have that directory that was constantly failing anymore, but I can check tonight.

I'm not sure if I still have that directory

You can always create such a directory.

 

I'm not sure if I still have that directory

You can always create such a directory.

 

 

No doubt, but if I had the exact same directory that made the issue recreatable 100% of the time, it would be even easier :).

Blah, since I no longer seem to have that directory, I am unable to recreate the problem before even trying the suggestions in earlier postings  >:(

  • Author

Let's try it and see what happens.  Telnet to your unRAID and type the following two lines:

ulimit -n 20000
/etc/rc.d/rc.samba restart

 

Now see if your problem is still there.

 

Let me know how it goes.

 

Tested, but unfortunately this fix does not do it for me. The too many files error still crops up. It may be that this problem is more related to windows 7 than samba. I found this thread on technet: http://social.technet.microsoft.com/Forums/en/w7itpronetworking/thread/6573c5f7-7c61-4c4d-bd04-0f55518ecbeb

 

Microsoft support suggestions to the OP were to check for hardware problems, check system file integrity (sfc), run update in-place. I did not try the update in place (seems silly), but I run the sfc utility (was OK) and replaced my existing switch with an HP procurve. Didn't make any difference. My feeling is that this is somewhat tied to windows 7 networking with a different OS, and is probably not hardware related.

 

If this were caused by hardware, why would multi GB files get transferred consistently without a problem? The error pops up exclusively when handling small files, the smaller the files sizes, the more likely it seems to occur.

 

Luca

It isn't hardware. I was originally having this problem only when copying that directory structure off my workstation to the unRAID unit. When I copied that same directory to the Drobo and DroboShare that was sitting right next to it on the same switch I didn't have this problem.

 

I was able to recreate it 100% of the time.

Let's try it and see what happens.  Telnet to your unRAID and type the following two lines:

ulimit -n 20000
/etc/rc.d/rc.samba restart

 

Now see if your problem is still there.

 

Let me know how it goes.

 

Tested, but unfortunately this fix does not do it for me.

 

 

Well, that was a shot in the dark anyway.  At least we proved that unRAID's 'ulimit -n' has nothing to do with the problem.

 

Upon some research, I noticed that this problem is widely reported all over the Internet, and is speciffic to windows-7.

So hopefully microsoft will get off their butts at some point and fix their mess.

 

Purko

 

 

  • Author

If that is the case, then do yourself a favor and get TeraCopy.

You can set it up to do CRC checks after it finishes all copying.

Not to mention that it does indeed copy stuff much faster than windows explorer.

And, it also has nice speed indicators. ;)

 

purko, thanks for suggesting teracopy. I just finished some tests copying a 4GB folder filled with small files to the server and no errors! The built-in CRC check is very nice too. Just to make sure, I went back to the windows copy, and got the error... It would be interesting to know if this works for everybody else.

As always, all issues to be introduced by using win%&$%§&

TeraCopy did the job for me too... :)

Thanks!

Glad to hear that!

 

  • 2 weeks later...

I've been using TeraCopy 2.12 as well and up until today I thought it had resolved the problem. I was copying 183.33GB in 32,507 files from my unRAID box onto a second test unRAID box.

 

I see the Too many files errors in my 1st unRAID box and TeraCopy says it skipped 5K+ files.

I see the Too many files errors in my 1st unRAID box and TeraCopy says it skipped 5K+ files.

 

At least with TeraCopy it tells you exactly which files were skipped, and it lets you retry copy only those files.

 

 

I've been using TeraCopy 2.12 as well and up until today I thought it had resolved the problem. I was copying 183.33GB in 32,507 files from my unRAID box onto a second test unRAID box.

In that scenario, dragging everything through the windows machine, you are copying everything twice over the network.

When you have such huge amount of stuff to be copied from one unRAID server to another unRAID server,

then you may want to copy directly from unRAID to unRAID, instead of  unRAID1->Win7 and then Win7->unRAID2.

Let's say you need to copy stuff from disk1 of server [192.168.1.3].  On your destination server type this:

mkdir /tmp/d1
mount.cifs  //192.168.1.3/disk1  /tmp/d1

...then copy the stuff directly from  /tmp/d1/  to where you want to put it.

 

Purko

 

Thanks. I wasn't bashing TeraCopy, it definitely improved things for me and up until today hid the problem and its an awesome program with a retry as you indicated. I was just mentioning the problem is being masked somewhere at the moment and in my case its a niche problem. I was just copying files to test and to have something to run parity checks against. It isn't a normal use for me, but I appreciate the commands as I can see using it in the future again.

 

I could place a small bet that this problem will go away when Limetech releases their next unRAID build with the new kernel.

I hope that this will happen soon.  Also, a Win7 update is way overdue, as it appears that this is not just unRAID-related problem.

 

 

Yep, I can believe it'll be resolved in either the next unRAID or Win7 update whichever comes first (I'd bet unRAID). It's more of a minor annoyance than any real problem for me now as Teracopy's error handling makes it painless. Without Teracopy I'd be really annoyed  ;D

  • Author

Yep, I can believe it'll be resolved in either the next unRAID or Win7 update whichever comes first (I'd bet unRAID). It's more of a minor annoyance than any real problem for me now as Teracopy's error handling makes it painless. Without Teracopy I'd be really annoyed  ;D

 

abeta, I just tried this, and it actually seems to have fixed my win7 <-> samba "too many files..." issue. I tested it using the built-in windows copy. This means one doesn't need teracopy anymore, though I'll probably continue using it because of the added functions.

 

try applying the following registry changes and reboot:

 

-  Set the following registry key to "1":

 

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\LargeSystemCache

 

- set the following registry key to "3":

 

HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\Size

 

- reboot

 

credit:

 

http://alan.lamielle.net/2009/09/03/windows-7-nonpaged-pool-srv-error-2017

  • 1 month later...
  • 2 weeks later...

Ok folks problem is back. The fix did not hold.

 

I also noticed that if I wait and click try again - it seems to go through then gets stuck a couple of files into the copy, again wait 2 minutes and click try again and it resumes the copy. Very strange.

Longer I wait to click Try Again the more files get copied before the error crops up again!

Very annoying.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.