Jump to content

infinite /dev/loop devices


jplimpens

Recommended Posts

jplimpens

For all having the same issue and looking for a solution........

 

Since the last update my Synology NAS started to perform bad.. Took me a while before I found the reason... about 210,000 /dev/loop device mounts on /tmp/emby. The NAS starts having a slow webinterface once it hits 31,000 /dev/loops mounted. As it turned out Emby had created infinite /dev/loop devices of sizes about 1GB to 7GB mounted on /tmp/emby/b[some hex].

 

Restarting the NAS cleand the loop devices and mounts, but after 5 to 10 minutes Emby would start creating the devices again, mounting them on /tmp/emby (no content playing or whatsoever). My content is a micture of mkv and iso files, but I surely don't have thousands of iso's.

 

After lots of google and forum search I found the solution on this forum in an old post. Adding the lines below to /etc/sudoers and rebooting the NAS fixes it. Question is, why would emby create infinite loop devices while nothing further is happening; why not just create a mounted loop device while playing an iso (and clean it up afterwards)?

 

Lines to add to /etc/sudoers:

 

## Entries Added for Emby Server Support

Defaults:emby !requiretty
emby ALL
=(root) NOPASSWD: /bin/mount
emby ALL
=(root) NOPASSWD: /bin/umount
emby ALL
=(root) NOPASSWD: /usr/bin/mount
emby ALL
=(root) NOPASSWD: /usr/bin/umount

Link to comment
Share on other sites

  • 5 months later...
jplimpens

After a long time running stable, last week I had pretty much the same issue.. Therefor this update.

 

Last week I rebooted my NAS and after a couple of days it started to perform bad and before I was able to search for the problem it became inaccessible. After reboot I had a look at the loop devices and I noticed emby was creating loop devices based on the iso's. Just not mounted to an iso. A dmesg showed me loop devices were created, but without mounts. 

 

I made a script which removes the loop devices and once run emby stops creating loop devices. However, restarting emby (or the NAS) it starts creating these loop devices again. So as a precaution I now run the script every night until I find a better solution. 

 

Regarding the question of mkv: yes and no.. I did have a look at it, but decided not to. Space is not a problem and I don't want to spend a lot of time turning these iso's into mkv. Also I wouldn't want to lose any content (I like the DVD way with menu, special stuff and so on).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...