Here’s the output of the file
command you suggested on the binaries I’m aware of.
root@nextcloud:~# file /usr/sbin/mysqld
/usr/sbin/mysqld: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=39d7222ac4e613386655e07c692e9ee949e786e6, stripped
root@nextcloud:~# file /usr/bin/mysql
/usr/bin/mysql: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=722eea8570a9528ab81d24b23dcb7e4c4c102219, stripped
root@nextcloud:~# file /usr/bin/php7.0
/usr/bin/php7.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=83a5621a43de87b4eb5b63859fefc70b964350cf, stripped
root@nextcloud:~# file /usr/sbin/apache2
/usr/sbin/apache2: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=a540a66c15a3ed4d2fdf0d6988b6889a3f390b9d, stripped
Regarding the /etc/my.cnf
options, I have binlog_format=mixed
, but not character-set-server=utf8mb4
. I looked at the NC 12 installation manual and there’s no mention of the configuration you say is important.
Here’s my /etc/my.cnf
:
[mysqld]
log-basename=master
log-bin
binlog-format=mixed
I also see nothing in the Linux Database Configuration that looks definitely amiss, although instead of the mysql.ini
file they mention there, I had these two files which don’t seem to contain similar content:
root@nextcloud:~# cat /etc/php/7.0/apache2/conf.d/20-mysqli.ini
; configuration for php mysql module
; priority=20
extension=mysqli.so
root@nextcloud:~# cat /etc/php/7.0/apache2/conf.d/10-mysqlnd.ini
; configuration for php mysql module
; priority=10
extension=mysqlnd.so
Here’s the output of DESCRIBE nextcloud.oc_filecache;
:
MariaDB [(none)]> describe nextcloud.oc_filecache;
+------------------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------+---------------+------+-----+---------+----------------+
| fileid | int(11) | NO | PRI | NULL | auto_increment |
| storage | int(11) | NO | MUL | 0 | |
| path | varchar(4000) | YES | | NULL | |
| path_hash | varchar(32) | NO | | | |
| parent | int(11) | NO | MUL | 0 | |
| name | varchar(250) | YES | | NULL | |
| mimetype | int(11) | NO | | 0 | |
| mimepart | int(11) | NO | | 0 | |
| size | bigint(20) | NO | | 0 | |
| mtime | int(11) | NO | | 0 | |
| storage_mtime | int(11) | NO | | 0 | |
| encrypted | int(11) | NO | | 0 | |
| unencrypted_size | bigint(20) | NO | | 0 | |
| etag | varchar(40) | YES | | NULL | |
| permissions | int(11) | YES | | 0 | |
| checksum | varchar(255) | YES | | NULL | |
+------------------+---------------+------+-----+---------+----------------+
16 rows in set (0.00 sec)
…and keying off the idea of seeing what’s actually in the index, I looked up one of the files that was having the issue and lo and behold:
MariaDB [(none)]> select * from nextcloud.oc_filecache where name like 'myfilename';
+--------+---------+---------------------+----------------------------------+--------+--------------+----------+----------+-----------+------------+---------------+-----------+------------------+---------------+-------------+----------+
| fileid | storage | path | path_hash | parent | name | mimetype | mimepart | size | mtime | storage_mtime | encrypted | unencrypted_size | etag | permissions | checksum |
+--------+---------+---------------------+----------------------------------+--------+--------------+----------+----------+-----------+------------+---------------+-----------+------------------+---------------+-------------+----------+
| 612 | 3 | mypath/myfilename | 6fcba252ebbb69b716e9243be290e329 | 141 | myfilename | 19 | 7 | 741403760 | 1397221022 | 1397221022 | 0 | 0 | 59e57c60b3036 | 27 | |
+--------+---------+---------------------+----------------------------------+--------+--------------+----------+----------+-----------+------------+---------------+-----------+------------------+---------------+-------------+----------+
1 row in set (0.00 sec)
…the size
column for this 30GB file is 741403760, which is the same wrong value I’m seeing from the client. The data type of this column seems fine, but just to test I created a test table with similar definition and proved it:
MariaDB [(none)]> create database if not exists test_db_delete_me;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> use test_db_delete_me;
Database changed
MariaDB [test_db_delete_me]> create table `test` (`size` bigint(20) NOT NULL DEFAULT '0');
Query OK, 0 rows affected (0.01 sec)
MariaDB [test_db_delete_me]> insert into test values (30806174832);
Query OK, 1 row affected (0.00 sec)
MariaDB [test_db_delete_me]> select * from test;
+-------------+
| size |
+-------------+
| 30806174832 |
+-------------+
1 row in set (0.00 sec)
So, I can only conclude that something before the database is causing this issue. What? I have no idea. Can anyone help?