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.

[6.3.5] Possible bug with Tunable (Direct IO)

Featured Replies

Not entirely sure if this is the right place for it, but thought I should mention this in case it helps anyone.

 

I tested enabling Direct IO mode and as soon as I did one of my dockers no longer worked. It would appear that direct io mode is having issues with sqlite or something in the docker in question.

 

The docker is linuxserver.io sonarr docker.  Other dockers that use sqlite seem okay so I am guessing this is an issue between mono and direct io maybe?

 

Shows this error whether there are any files in config folder or not. Without direct io enabled it works fine.

 

Here is the log:

 

 

 


17-7-29 18:13:49.4|Info|Bootstrap|Starting Sonarr - /opt/NzbDrone/NzbDrone.exe - Version 2.0.0.4855
17-7-29 18:13:49.7|Info|AppFolderInfo|Data directory is being overridden to [/config]
17-7-29 18:13:50.8|Info|MigrationLogger|*** Migrating data source=/config/nzbdrone.db;cache size=-10485760;datetimekind=Utc;journal mode=Wal;pooling=True;version=3 ***
17-7-29 18:13:50.8|Fatal|ConsoleApp|EPIC FAIL!

[v2.0.0.4855] NzbDrone.Core.Datastore.CorruptDatabaseException: Database file: /config/nzbdrone.db is corrupt, restore from backup if available. See: https://github.com/Sonarr/Sonarr/wiki/FAQ#i-am-getting-an-error-database-disk-image-is-malformed ---> System.Data.SQLite.SQLiteException: disk I/O error
disk I/O error
  at System.Data.SQLite.SQLite3.Prepare (System.Data.SQLite.SQLiteConnection cnn, System.String strSql, System.Data.SQLite.SQLiteStatement previous, System.UInt32 timeoutMS, System.String& strRemain) [0x0033c] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteCommand.BuildNextCommand () [0x000f6] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteCommand.GetStatement (System.Int32 index) [0x00008] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteCommand:GetStatement (int)
  at System.Data.SQLite.SQLiteDataReader.NextResult () [0x0011e] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteDataReader..ctor (System.Data.SQLite.SQLiteCommand cmd, System.Data.CommandBehavior behave) [0x00090] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at (wrapper remoting-invoke-with-check) System.Data.SQLite.SQLiteDataReader:.ctor (System.Data.SQLite.SQLiteCommand,System.Data.CommandBehavior)
  at System.Data.SQLite.SQLiteCommand.ExecuteReader (System.Data.CommandBehavior behavior) [0x0000c] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery (System.Data.CommandBehavior behavior) [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery () [0x00006] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at System.Data.SQLite.SQLiteConnection.Open () [0x00959] in <61a20cde294d4a3eb43b9d9f6284613b>:0
  at FluentMigrator.Runner.Processors.GenericProcessorBase.EnsureConnectionIsOpen () [0x0000e] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\Processors\GenericProcessorBase.cs:54
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.Exists (System.String template, System.Object[] args) [0x00000] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\Processors\SQLite\SQLiteProcessor.cs:78
  at FluentMigrator.Runner.Processors.SQLite.SQLiteProcessor.TableExists (System.String schemaName, System.String tableName) [0x00000] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\Processors\SQLite\SQLiteProcessor.cs:47
  at FluentMigrator.Runner.VersionLoader.get_AlreadyCreatedVersionTable () [0x00000] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:124
  at FluentMigrator.Runner.VersionLoader.LoadVersionInfo () [0x00028] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:160
  at FluentMigrator.Runner.VersionLoader..ctor (FluentMigrator.Runner.IMigrationRunner runner, FluentMigrator.Infrastructure.IAssemblyCollection assemblies, FluentMigrator.IMigrationConventions conventions) [0x00077] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\VersionLoader.cs:50
  at FluentMigrator.Runner.MigrationRunner..ctor (FluentMigrator.Infrastructure.IAssemblyCollection assemblies, FluentMigrator.Runner.Initialization.IRunnerContext runnerContext, FluentMigrator.IMigrationProcessor processor) [0x00167] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:102
  at FluentMigrator.Runner.MigrationRunner..ctor (System.Reflection.Assembly assembly, FluentMigrator.Runner.Initialization.IRunnerContext runnerContext, FluentMigrator.IMigrationProcessor processor) [0x00000] in C:\Users\Mark\Source\Repos\fluentmigrator\src\FluentMigrator.Runner\MigrationRunner.cs:72
  at NzbDrone.Core.Datastore.Migration.Framework.MigrationController.Migrate (System.String connectionString, NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x000b5] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\Migration\Framework\MigrationController.cs:58
  at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x00048] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\DbFactory.cs:84
   --- End of inner exception stack trace ---
  at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationContext migrationContext) [0x00121] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\DbFactory.cs:116
  at NzbDrone.Core.Datastore.DbFactory.Create (NzbDrone.Core.Datastore.Migration.Framework.MigrationType migrationType) [0x00000] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\DbFactory.cs:56
  at NzbDrone.Core.Datastore.DbFactory.RegisterDatabase (NzbDrone.Common.Composition.IContainer container) [0x00000] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Core\Datastore\DbFactory.cs:36
  at NzbDrone.Host.Bootstrap.Start (NzbDrone.Host.ApplicationModes applicationModes, NzbDrone.Common.EnvironmentInfo.StartupContext startupContext) [0x0003d] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Bootstrap.cs:73
  at NzbDrone.Host.Bootstrap.Start (NzbDrone.Common.EnvironmentInfo.StartupContext startupContext, NzbDrone.Host.IUserAlert userAlert, System.Action`1[T] startCallback) [0x00075] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Host\Bootstrap.cs:40
  at NzbDrone.Console.ConsoleApp.Main (System.String[] args) [0x0000e] in M:\BuildAgent\work\b69c1fe19bfc2c38\src\NzbDrone.Console\ConsoleApp.cs:20

 

 

 

(Not particularly looking for support btw, before anyone moves this to that forum, as I'm just going to not use direct io. If this thread is of no help just delete it)

Edited by Iormangund

HAHA! I think I have found the real culprit here! I've been messing around with things in unRAID for about the past two weeks since I just started using it and things have been acting goofy here and there. It seemed that most of my older containers would work, but then suddenly new containers didn't work, the first ones that I noticed were Sonarr and Radarr, so I thought it was specific to them, but it turned out that it affected other containers as well, especially ones that used to work, like Plex. 

 

It didn't matter what container I tried, or anything, it kept giving me the same issues with SQLite. After a few hours of googling and trial and error earlier, I found this post stating that FUSE kinda freaks out when you have the share set as cache-only and set your container's /config path to /mnt/user/appdata instead of /mnt/cache/appdata.

 

As soon as I set the /config directory to /mnt/cache it worked as expected. Give it a try and let me know if you experience the same. If so, then there should definitely be an option that forces appdata on /mnt/cache instead of /mnt/user

  • Author
48 minutes ago, brando56894 said:

HAHA! I think I have found the real culprit here! I've been messing around with things in unRAID for about the past two weeks since I just started using it and things have been acting goofy here and there. It seemed that most of my older containers would work, but then suddenly new containers didn't work, the first ones that I noticed were Sonarr and Radarr, so I thought it was specific to them, but it turned out that it affected other containers as well, especially ones that used to work, like Plex. 

 

It didn't matter what container I tried, or anything, it kept giving me the same issues with SQLite. After a few hours of googling and trial and error earlier, I found this post stating that FUSE kinda freaks out when you have the share set as cache-only and set your container's /config path to /mnt/user/appdata instead of /mnt/cache/appdata.

 

As soon as I set the /config directory to /mnt/cache it worked as expected. Give it a try and let me know if you experience the same. If so, then there should definitely be an option that forces appdata on /mnt/cache instead of /mnt/user

 

Interesting, never would have thought of that. I just gave it a try and it seemed to work when I start it with no sonarr config folder created in /mnt/cache/appdata however it still reports corruption if I use my previous db so I suspect the fuse 'freak out' somehow broke the previous config db. Going to try and see if I can restore it. [Edit: restored fine after clearing out everything except nzbdrone.db so no actual db damage it seems]

 

So far no other dockers have had an issue (sickrage, couchpotato and nzbget specifically), and this only started with directio enabled.

 

I thought there were some risks when using /mnt/cache instead of /mnt/user?

 

Thank you for the suggestion, will see if it causes anymore issues when using /mnt/cache. Wonder if this is something that can be fixed in unraid or if it's stuck till fuse gets updated?

Edited by Iormangund

I have no idea if issues exist in using /mnt/cache since I've been using unRAID for all of 2 weeks and haven't had a stable system for more than a day or two haha (KVM doesn't like my CPU, waiting on receiving my new motherboard so I can upgrade my CPU :) ).

 

I had issues with Plex, Sonarr, Radarr, and probably a few other things that I can't remember.

Doesn't direct i/o (on non cache array mounts) need higher docker privileges for some operations? You could try running the docker in privileged mode.

Edited by Videodr0me

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.