[MDEV-21260] MariadDB on Windows (datadir as network resource) Created: 2019-12-09  Updated: 2019-12-12  Resolved: 2019-12-12

Status: Closed
Project: MariaDB Server
Component/s: Platform Windows
Affects Version/s: 10.4.8
Fix Version/s: 10.4.12

Type: Bug Priority: Minor
Reporter: Kai Klueber Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: CreateFile, datadir, network, unc, windows
Environment:

Windows Server 2012 R2 / Windows 10 Enterprise


Attachments: Text File errorlog.txt    

 Description   

We run MariaDB 10.4.8 with the parameter datadir as network resource (UNC-Path)

Our configuration:

---------------------------------------------------------------------
[mysqld]
datadir			= //STA-WS001/MariaDBData/Data
port			= 3306
innodb_buffer_pool_size = 2033M
character-set-server	= utf8
[client]
port			= 3306
plugin-dir		= C:/Program Files/MariaDB 10.4/lib/plugin
---------------------------------------------------------------------

The mariadb-error-log shows the following entries as soon a new InnoDB-table is created ("CREATE TABLE ..."):

2019-12-09 16:20:30 36 [ERROR] InnoDB: Operating system error number 3 in a file operation.
2019-12-09 16:20:30 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-12-09 16:20:30 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.

If we set "innodb_file_per_table = OFF" the problem is not showing up.



 Comments   
Comment by Vladislav Vaintroub [ 2019-12-10 ]

An easy workaround seem to be to create a symbolic link (with mklink) pointing to the UNC path, and use it as datadir.

Can you attach the full error log , please? Just for my curiosity, why would you use remote SMB pathfor the database? That seems a lot of network and SMB overhead, for every IO

Comment by Vladislav Vaintroub [ 2019-12-11 ]

I'm able to actually start database, if I put files on (local) share.
Yes there is a couple of ERRORs that should be better WARNINGs, but it starts ok, and I'm able to create tables, insert data, etc.
kaiklue, why do you think it deserved a "Blocker" status? Do I miss anything, something else does not work, apart from extra messages?
I downgraded its prio for the time being, until there is an explanation

This is what I got.

2019-12-12  0:44:29 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-12-12  0:44:29 0 [Note] InnoDB: Loading buffer pool(s) from \\workpc\work\10.4\xxx\sql\data\ib_buffer_pool
2019-12-12  0:44:29 0 [ERROR] InnoDB: Operating system error number 3 in a file operation.
2019-12-12  0:44:29 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-12-12  0:44:29 0 [Note] Server socket created on IP: '::'.
2019-12-12  0:44:29 0 [ERROR] InnoDB: File \\.\\\workpc\work: 'CreateFile()' returned OS error 203.
2019-12-12  0:44:29 0 [ERROR] InnoDB: Operating system error number 3 in a file operation.
2019-12-12  0:44:29 0 [ERROR] InnoDB: The error means the system cannot find the path specified.
2019-12-12  0:44:29 0 [ERROR] InnoDB: File \\.\\\workpc\work: 'CreateFile()' returned OS error 203.
2019-12-12  0:44:29 0 [Note] InnoDB: Buffer pool(s) load completed at 191212  0:44:29
2019-12-12  0:44:29 0 [Note] Reading of all Master_info entries succeeded
2019-12-12  0:44:29 0 [Note] Added new Master_info '' to hash table
2019-12-12  0:44:29 0 [Note] mysqld: ready for connections.
Version: '10.4.11-MariaDB-debug'  socket: ''  port: 3306  Source distribution

Comment by Kai Klueber [ 2019-12-12 ]

Thanks for the feedback.

I attached the errorlog.

Yes, the database is starting. Removing the status "blocker" is ok.

Can you tell me more about the error and why this error is not cirtical. What is the cause of the error-message?

I noticed that the ticket is now in the status "closed" and that there will be an fix on 10.4.12. Can you tell me more about the fix?

errorlog.txt

Comment by Vladislav Vaintroub [ 2019-12-12 ]

The Innodb tries to find out what is the sector size on the disk, and whether it is on SSD.
(It is used for optimization, e.g if your disk sectors size and innodb_page_size are both 4K, then doublewrite buffer is not used for writes, because the writes are atomic).

To achieve that, Innodb tries to open the volume where file is on (which would be like, C:\ for datadir on local disk). But for the UNC, it can't, thus the error message.

But there is no big tragedy, if it can't find out about sector size or SSD, then it falls back to defaults.
I just suppressed the error message, for the UNC, because it does not make much sense to present it, error should only be written for real problems, which is here not the case.

Comment by Kai Klueber [ 2019-12-12 ]

Thanks for the detailed explanation

Generated at Thu Feb 08 09:05:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.