What are the limitations of the Network Database (MariaDB)?

Does anyone know if there are any capacity limitations on the “Network Database” in terms of maximum disk capacity being used / number of records / number of tables?

I have digiKam 8.1.0 using the PR4100’s Network Database as its Remote MySQL Server.
It worked with no pain at all and was easy to setup (I used phpMyAdmin (3rd Party app) to create the user and the required permissions on the new database)

Now it appears digiKam thinks the Network Database is out of space.
When it got to about 650MB / 28 tables with 3M records (300k images and 4k videos), digiKam will not run because it says the MySQL database is out of space.
The kicker is that the PR4100 still has 10TB of usable space.

I suspect that the Network Database’s storage space is on a dedicated partition of drive-1 and cannot be moved to the RAID5 group and it’s not protected. I had drive-1 fail a few months ago and the MySQL database was wiped out when it finished the rebuild.

> |00000009|24.43523026|[19380] digikam.widgets: Breeze icons resource file found||
> |00000010|24.45083427|[19380] digikam.widgets: Breeze-dark icons resource file found||
> |00000011|24.46383667|[19380] digikam.general: Qt standard translations removed: 8||
> |00000012|24.46413994|[19380] digikam.general: Qt standard translations path: C:/Program Files/digiKam/translations||
> |00000013|24.46490860|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qt||
> |00000014|24.46540070|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtbase||
> |00000015|24.46587181|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qt_help||
> |00000016|24.46633911|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtdeclarative||
> |00000017|24.46680832|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtquickcontrols||
> |00000018|24.46727753|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtquickcontrols2||
> |00000019|24.46773148|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtmultimedia||
> |00000020|24.46826363|[19380] digikam.general: Loaded Qt standard translations en_US from catalog qtwebengine||
> |00000021|24.47150993|[19380] digikam.general: Loaded Qt ECM translations en from catalog kcoreaddons6_qt||
> |00000022|24.47346115|[19380] digikam.general: Loaded Qt ECM translations en from catalog kwidgetsaddons6_qt||
> |00000023|24.49486351|[19380] digikam.general: Switch to widget style:  Breeze||
> |00000024|24.49530792|[19380] digikam.general: AlbumWatch is disabled||
> |00000025|24.53888893|[19380] digikam.general: Database Parameters:||
> |00000026|24.53888893|[19380]    Type:                        QMYSQL||
> |00000027|24.53888893|[19380]    DB Core Name:                digikam||
> |00000028|24.53888893|[19380]    DB Thumbs Name:              D:/digikam||
> |00000029|24.53888893|[19380]    DB Face Name:                digikam||
> |00000030|24.53888893|[19380]    DB Similarity Name:          digikam||
> |00000031|24.53888893|[19380]    Connect Options:             ||
> |00000032|24.53888893|[19380]    Host Name:                   wd-pr4100-02||
> |00000033|24.53888893|[19380]    Host Port:                   3306||
> |00000034|24.53888893|[19380]    WAL Mode:                    false||
> |00000035|24.53888893|[19380]    Internal Server:             false||
> |00000036|24.53888893|[19380]    Internal Server Path:        ||
> |00000037|24.53888893|[19380]    Internal Server Init Cmd:    ||
> |00000038|24.53888893|[19380]    Internal Server Admin Cmd:   ||
> |00000039|24.53888893|[19380]    Internal Server Program Cmd: ||
> |00000040|24.53888893|[19380]    Internal Server Upgrade Cmd: ||
> |00000041|24.53888893|[19380]    Username:                    digikam||
> |00000042|24.53888893|[19380]    Password:                    XXXXXXX||
> |00000043|24.53888893|[19380] ||
> |00000044|24.76646614|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000045|24.76933670|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000046|25.07932663|[19380] digikam.dbengine: Loading SQL code from config file C:/Program Files/digiKam/data/digikam/database/dbconfig.xml||
> |00000047|25.08560944|[19380] digikam.dbengine: Checking XML version ID => expected:  3  found:  3||
> |00000048|25.09177208|[19380] digikam.coredb: Core database: running schema update||
> |00000049|25.09691048|[19380] digikam.dbengine: Failure executing query:||
> |00000050|25.09691048|[19380]   ||
> |00000051|25.09691048|[19380] Error messages: QMYSQL: Unable to execute query Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \No space left on device\) 3 2 ||
> |00000052|25.09691048|[19380] Bound values:  QList()||
> |00000053|25.09696388|[19380] digikam.dbengine: Error while executing DBAction [ CheckPriv_CREATE_TABLE ] Statement [ CREATE TABLE IF NOT EXISTS PrivCheck\n                    (id   INT,\n                    name VARCHAR(35))\n                    ENGINE InnoDB;\n                 ]||
> |00000054|25.09699249|[19380] digikam.coredb: Core database: error while creating a trigger. Details: QSqlError(3, QMYSQL: Unable to execute query, Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \No space left on device\))||
> |00000055|25.09709740|[19380] digikam.coredb: Core database: insufficient rights on database.||
> |00000056|25.09719086|[19380] digikam.coredb: Core database: cannot process schema initialization||
> |00000057|25.12446022|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000058|25.12749100|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000059|25.13652039|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000060|25.14043427|[19380] qt.svg: Could not create image from /media/250gb/valokuvat/Syksy 02-09-05 Kuusamo, inkavaaralla luonnonpuistossa suomen komeimman kosken kuvaamista/img_5766_4.jpg||
> |00000061|29.14925385|[19380] digikam.general: Allowing a cache size of 1024 MB||
> |00000062|29.15810013|[19380] digikam.general: Testing  mariadb-upgrade.exe ...||
> |00000063|29.16261101|[19380] digikam.general: Testing  mariadbd.exe ...||
> |00000064|29.16526794|[19380] digikam.general: Testing  mariadb-admin.exe ...||
> |00000065|29.16800880|[19380] digikam.general: Testing  mariadb-install-db.exe ...||
> |00000066|29.17433357|[19380] digikam.general: Testing  mariadbd.exe ...||
> |00000067|29.17908478|[19380] digikam.general: Testing  mariadb-admin.exe ...||
> |00000068|29.18315506|[19380] digikam.general: Testing  mariadb-upgrade.exe ...||
> |00000069|29.18721962|[19380] digikam.general: Testing  mariadb-install-db.exe ...||
> |00000070|29.19128227|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadbd.exe ...||
> |00000071|29.19192314|[19380] digikam.general: All Binaries Found :  false||
> |00000072|29.19196892|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-admin.exe ...||
> |00000073|29.19252396|[19380] digikam.general: All Binaries Found :  false||
> |00000074|29.19257927|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-upgrade.exe ...||
> |00000075|29.19307899|[19380] digikam.general: All Binaries Found :  false||
> |00000076|29.19312668|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-install-db.exe ...||
> |00000077|29.19357109|[19380] digikam.general: All Binaries Found :  false||
> |00000078|29.19358635|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadbd.exe ...||
> |00000079|29.19404221|[19380] digikam.general: All Binaries Found :  false||
> |00000080|29.19406319|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-admin.exe ...||
> |00000081|29.19451141|[19380] digikam.general: All Binaries Found :  false||
> |00000082|29.19453430|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-upgrade.exe ...||
> |00000083|29.19496727|[19380] digikam.general: All Binaries Found :  false||
> |00000084|29.19499207|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-install-db.exe ...||
> |00000085|29.19541168|[19380] digikam.general: All Binaries Found :  false||
> |00000086|32.15975571|[19380] kf.windowsystem: Could not find any platform plugin||
> |00000087|60.52793121|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000088|60.58565903|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000089|60.73950577|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000090|60.78293228|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000091|60.78447342|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000092|60.78525543|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000093|93.97939301|[19380] digikam.general: Database Parameters:||
> |00000094|93.97939301|[19380]    Type:                        QMYSQL||
> |00000095|93.97939301|[19380]    DB Core Name:                digikam||
> |00000096|93.97939301|[19380]    DB Thumbs Name:              D:/digikam||
> |00000097|93.97939301|[19380]    DB Face Name:                digikam||
> |00000098|93.97939301|[19380]    DB Similarity Name:          digikam||
> |00000099|93.97939301|[19380]    Connect Options:             ||
> |00000100|93.97939301|[19380]    Host Name:                   192.168.123.12||
> |00000101|93.97939301|[19380]    Host Port:                   3306||
> |00000102|93.97939301|[19380]    WAL Mode:                    false||
> |00000103|93.97939301|[19380]    Internal Server:             false||
> |00000104|93.97939301|[19380]    Internal Server Path:        ||
> |00000105|93.97939301|[19380]    Internal Server Init Cmd:    ||
> |00000106|93.97939301|[19380]    Internal Server Admin Cmd:   ||
> |00000107|93.97939301|[19380]    Internal Server Program Cmd: ||
> |00000108|93.97939301|[19380]    Internal Server Upgrade Cmd: ||
> |00000109|93.97939301|[19380]    Username:                    digikam||
> |00000110|93.97939301|[19380]    Password:                    XXXXXXX||
> |00000111|93.97939301|[19380] ||
> |00000112|93.99256897|[19380] digikam.coredb: Core database: running schema update||
> |00000113|93.99736786|[19380] digikam.dbengine: Failure executing query:||
> |00000114|93.99736786|[19380]   ||
> |00000115|93.99736786|[19380] Error messages: QMYSQL: Unable to execute query Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \No space left on device\) 3 2 ||
> |00000116|93.99736786|[19380] Bound values:  QList()||
> |00000117|93.99742126|[19380] digikam.dbengine: Error while executing DBAction [ CheckPriv_CREATE_TABLE ] Statement [ CREATE TABLE IF NOT EXISTS PrivCheck\n                    (id   INT,\n                    name VARCHAR(35))\n                    ENGINE InnoDB;\n                 ]||
> |00000118|93.99750519|[19380] digikam.coredb: Core database: error while creating a trigger. Details: QSqlError(3, QMYSQL: Unable to execute query, Error writing file './digikam/PrivCheck.frm' (Errcode: 28 \No space left on device\))||
> |00000119|93.99765015|[19380] digikam.coredb: Core database: insufficient rights on database.||
> |00000120|93.99775696|[19380] digikam.coredb: Core database: cannot process schema initialization||
> |00000121|118.71429443|[19380] digikam.general: Testing  mariadb-upgrade.exe ...||
> |00000122|118.71794891|[19380] digikam.general: Testing  mariadbd.exe ...||
> |00000123|118.72219849|[19380] digikam.general: Testing  mariadb-admin.exe ...||
> |00000124|118.72600555|[19380] digikam.general: Testing  mariadb-install-db.exe ...||
> |00000125|118.73290253|[19380] digikam.general: Testing  mariadbd.exe ...||
> |00000126|118.73794556|[19380] digikam.general: Testing  mariadb-admin.exe ...||
> |00000127|118.74274445|[19380] digikam.general: Testing  mariadb-upgrade.exe ...||
> |00000128|118.74670410|[19380] digikam.general: Testing  mariadb-install-db.exe ...||
> |00000129|118.75078583|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadbd.exe ...||
> |00000130|118.75129700|[19380] digikam.general: All Binaries Found :  false||
> |00000131|118.75135040|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-admin.exe ...||
> |00000132|118.75179291|[19380] digikam.general: All Binaries Found :  false||
> |00000133|118.75184631|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-upgrade.exe ...||
> |00000134|118.75228119|[19380] digikam.general: All Binaries Found :  false||
> |00000135|118.75231934|[19380] digikam.general: Testing  C:/Program Files/MariaDB 10.5/bin/mariadb-install-db.exe ...||
> |00000136|118.75275421|[19380] digikam.general: All Binaries Found :  false||
> |00000137|118.75279236|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadbd.exe ...||
> |00000138|118.75322723|[19380] digikam.general: All Binaries Found :  false||
> |00000139|118.75326538|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-admin.exe ...||
> |00000140|118.75371552|[19380] digikam.general: All Binaries Found :  false||
> |00000141|118.75376892|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-upgrade.exe ...||
> |00000142|118.75418854|[19380] digikam.general: All Binaries Found :  false||
> |00000143|118.75422668|[19380] digikam.general: Testing  C:/Program Files/MariaDB 11.4/bin/mariadb-install-db.exe ...||
> |00000144|118.75462341|[19380] digikam.general: All Binaries Found :  false||
> |00000145|120.78368378|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000146|120.83577728|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000147|120.99108124|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000148|121.04596710|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000149|121.04734802|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000150|121.04808807|[2896] Error moving 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt' -> 'C:\ProgramData\McAfee\WebAdvisor\UIHost.exe\logic-log_0005005100270006001F00320054000D.txt.0'. Error: 5||
> |00000151|122.98679352|[19380] QThreadStorage: Thread 0x1b8130889b0 exited after QThreadStorage 9 destroyed||
> |00000152|122.98719025|[19380] QWaitCondition: Destroyed while threads are still waiting||
1 Like

I stopped the MariaDB service, moved /mnt/HD_a4/.@database@ to /mnt/HD/HD_a2/.@database@ and then created a symbolic link …

drwxr-xr-x    4 root     root          4096 Oct 20  2023 .
drwxrwxrwt    9 root     root           180 Feb 13 17:21 ..
lrwxrwxrwx    1 root     root            26 Jul 28  2022 .@database@ -> /mnt/HD/HD_a2/.@database@/
drwxrwxrwx    3 root     root          4096 Feb 13 17:22 .systemfile
drwxrwxrwx    2 root     root          4096 Jul 15  2022 .wdphotos

Then restarted MariaDB.

Mine is on /mnt/HD_b4. Maybe because drive-1 died while Network Database was enabled.

root@WD-PR4100-02 HD_b4 # ls -la
drwxr-xr-x    6 root     root          4096 Jan 24 16:08 .
drwxrwxrwt    9 root     root           180 Feb 13 08:49 ..
drwx------    6 root     root          4096 Feb 16 14:13 .@database@
drwx------    3 root     root          4096 Feb 13 08:50 .systemfile
drwxr-xr-x    2 root     root          4096 Nov 19 14:17 .wdphotos
drwx------    2 root     root         16384 Mar  4  2024 lost+found
root@WD-PR4100-02 HD_b4 # du -h
16K     ./lost+found
12K     ./.systemfile/P2
52K     ./.systemfile
4.0K    ./.wdphotos
3.0M    ./.@database@/mysql
8.0K    ./.@database@/performance_schema
1.4M    ./.@database@/phpmyadmin
725M    ./.@database@/digikam
913M    ./.@database@
913M    .
root@WD-PR4100-02 HD_b4 # ls -la .@database@
drwx------    6 root     root          4096 Feb 16 14:13 .
drwxr-xr-x    6 root     root          4096 Jan 24 16:08 ..
-rw-rw----    1 root     root         49152 Feb 18 13:21 WD-PR4100-02.err
-rw-rw----    1 root     root             5 Feb 13 08:50 WD-PR4100-02.pid
-rw-rw----    1 root     root        131072 Feb 18 01:41 aria_log.00000001
-rw-rw----    1 root     root            52 Feb 18 01:41 aria_log_control
drwx------    2 root     root          4096 Feb 20 11:10 digikam
-rw-rw----    1 root     root          2223 Feb 13 05:24 ib_buffer_pool
-rw-rw----    1 root     root     100663296 Feb 20 11:16 ib_logfile0
-rw-rw----    1 root     root      79691776 Feb 18 11:05 ibdata1
-rw-rw----    1 root     root      12582912 Feb 16 08:46 ibtmp1
-rw-rw----    1 root     root             0 Jan 24 16:08 multi-master.info
drwx------    2 root     root          4096 Jan 27 15:58 mysql
-rw-r-----    1 root     root            16 Jan 24 16:08 mysql_upgrade_info
drwx------    2 root     root          4096 Jan 24 16:08 performance_schema
drwx------    2 root     root          4096 Jan 27 17:26 phpmyadmin
root@WD-PR4100-02 HD_b4 #

Dumb question:
How do you stop / restart MariaDB on a PR4100 with BusyBox?
It seems that only “killall” is installed with no “systemctl”, “service” or “start-stop-daemon”.
Killing it is one thing, but then starting will be another.

Thanks,

It’s in the NAS’s control panel.
Settings → Network → Network services section → Network Database option.

Settings → Network → Network services section → Network Database option.

I’m not saying that doesn’t work, but I tried that a few weeks ago and I almost certain it deleted the database that I was using when I disabled it.

I’ve been hacking at this for a while, and I may have missed something.
It could have been related to drive-1 failing on both my PR4100 at almost the same time and wiping out the database(s).

But, at this point, I don’t have much to lose.

Thanks,

That fixed the underlaying issue.
Once the /mnt/HD_b4/.@database@ directory was moved to the /mnt/HD/HD_a4 RAID5, the app “digiKam” started without its lack of permissions error message.

On its startup, digiKam connects to the remote MySQL server, creates a new table, writes a couple of records, then deletes the table as a validation that the MySQL database is ready. The lack of permissions error message is its way of saying “something is wrong when I tried to create a table. It must be the lack of permissions” when in fact it’s a lack of disk space.

If anyone is looking at this from the future, and needs the steps:

  • Stop Network Database (as described above) - that did not delete the databases.
  • SSH into the WD NAS using an SSH terminal like PuTTY as the sshd user.
  • Change to the /mnt and look at each mount until you find a directory:

.@database@

That is the MySQL / MariaDB data and config directory. Mine was in /mnt/HD_b4. EG: cd /mnt/HD_b4

  • Use the “mv” command to move the database directory to the RAID protected mount.
    mv /mnt/HD_b4/.@database. /mnt/HD/HD_a2
    This should only take a couple of seconds to complete.
  • Create a link to the new location.
    ln -s /mnt/HD/HD_a2/.@database@
  • Go back to the Web GUI and enable Network Database.

In my case, phpMyAdmin showed everything was the same as it was before and digiKam started with no complaints

It looks like MySQL is running out of space on the specific partition where the database is stored despite having free space on the RAID5 array.

You might want to check the MySQL data directory location and see if it can be moved to different partition with more space.

anamikapandeyyy
It looks like MySQL is running out of space on the specific partition where the database is stored despite having free space on the RAID5 array.

You might want to check the MySQL data directory location and see if it can be moved to different partition with more space.

Yeah, I said that. But thanks