Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21260

MariadDB on Windows (datadir as network resource)

Details

    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.

      Attachments

        Activity

          kaiklue Kai Klueber created issue -
          kaiklue Kai Klueber made changes -
          Field Original Value New Value
          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 table is created ("CREATE TABLE ..."):

          2019-12-09 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.

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

          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.

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

          kaiklue Kai Klueber made changes -
          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: Table `mysql`.`innodb_table_stats` not found.

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

          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 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.

          kaiklue Kai Klueber made changes -
          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 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.

          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 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.

          kaiklue Kai Klueber made changes -
          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 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 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.

          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.

          anel Anel Husakovic made changes -
          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.

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

          Our configuration:
          {code: noformat}
          ---------------------------------------------------------------------
          [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
          ---------------------------------------------------------------------
          {code}
          The mariadb-error-log shows the following entries as soon a new InnoDB-table is created ("CREATE TABLE ..."):
          {code:noformat}
          2019-12-09 16:20:30 36 [ERROR] InnoDB: Operating system error number 3 in a file operation.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.
          {code}
          If we set "innodb_file_per_table = OFF" the problem is not showing up.

          kaiklue Kai Klueber made changes -
          Description We run MariaDB 10.4.8 with the parameter datadir as network resource (UNC-Path)

          Our configuration:
          {code: noformat}
          ---------------------------------------------------------------------
          [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
          ---------------------------------------------------------------------
          {code}
          The mariadb-error-log shows the following entries as soon a new InnoDB-table is created ("CREATE TABLE ..."):
          {code:noformat}
          2019-12-09 16:20:30 36 [ERROR] InnoDB: Operating system error number 3 in a file operation.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: The error means the system cannot find the path specified.
          2019-12-09 15:32:39 36 [ERROR] InnoDB: File \\.\\\STA-WS001\MariaDBData: 'CreateFile()' returned OS error 203.
          {code}
          If we set "innodb_file_per_table = OFF" the problem is not showing up.

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

          Our configuration:
          {code: noformat}
          ---------------------------------------------------------------------
          [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
          ---------------------------------------------------------------------
          {code}
          The mariadb-error-log shows the following entries as soon a new InnoDB-table is created ("CREATE TABLE ..."):
          {code:noformat}
          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.
          {code}
          If we set "innodb_file_per_table = OFF" the problem is not showing up.

          wlad Vladislav Vaintroub added a comment - - edited

          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

          wlad Vladislav Vaintroub added a comment - - edited 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
          wlad Vladislav Vaintroub made changes -
          Priority Blocker [ 1 ] Major [ 3 ]

          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
          

          wlad Vladislav Vaintroub added a comment - 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
          wlad Vladislav Vaintroub made changes -
          Assignee Vladislav Vaintroub [ wlad ]
          wlad Vladislav Vaintroub made changes -
          Component/s Data Definition - Create Table [ 14503 ]
          Fix Version/s 10.4.12 [ 24019 ]
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Closed [ 6 ]
          wlad Vladislav Vaintroub made changes -
          Priority Major [ 3 ] Minor [ 4 ]
          kaiklue Kai Klueber made changes -
          Attachment errorlog.txt [ 49656 ]
          kaiklue Kai Klueber made changes -
          Attachment errorlog.txt [ 49656 ]
          kaiklue Kai Klueber made changes -
          Attachment errorlog.txt [ 49657 ]
          kaiklue Kai Klueber added a comment -

          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

          kaiklue Kai Klueber added a comment - 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
          wlad Vladislav Vaintroub added a comment - - edited

          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.

          wlad Vladislav Vaintroub added a comment - - edited 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.
          kaiklue Kai Klueber added a comment -

          Thanks for the detailed explanation

          kaiklue Kai Klueber added a comment - Thanks for the detailed explanation
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 101744 ] MariaDB v4 [ 157074 ]

          People

            wlad Vladislav Vaintroub
            kaiklue Kai Klueber
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.