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

4K logical sector size

    XMLWordPrintable

Details

    Description

      Step 1. Create a virtual hard drive with a 4K logical sector size VHDX.

      We can use power shell to do this: New-VHD –Path "G:\ProgramData\Microsoft\Windows\Hyper-V\Ubuntu Slave\slave.vhdx" –SizeBytes 127GB –Dynamic –BlockSizeBytes 1MB –LogicalSectorSizeBytes 4096
      I assume this issue is also reproducible on 4k native storage systems.

      2. Create a VM and attach the previously created VHDX as only disk.
      3. Install Ubuntu 16.04 as usual.
      I suppose this issue is also reproducible on other systems using the Linux kernel, but haven't tested that
      4. Install MariaDB 10.1.13 as usual

      The setup will end with an error:

      Setting up mariadb-server-10.1 (10.1.13+maria-1~wily) ...
      dpkg: error processing package mariadb-server-10.1 (--configure):
       subprocess installed post-installation script returned error exit status 1
      dpkg: dependency problems prevent configuration of mariadb-server:
       mariadb-server depends on mariadb-server-10.1 (= 10.1.13+maria-1~wily); however:
        Package mariadb-server-10.1 is not configured yet.
       
      dpkg: error processing package mariadb-server (--configure):
       dependency problems - leaving unconfigured
      Processing triggers for libc-bin (2.23-0ubuntu3) ...
      No apport report written because the error message indicates its a followup error from a previous failure.
                                Processing triggers for ureadahead (0.100.0-19) ...
      Processing triggers for systemd (229-4ubuntu4) ...
      Errors were encountered while processing:
       mariadb-server-10.1
       mariadb-server
      E: Sub-process /usr/bin/dpkg returned an error code (1)
      

      The syslog tells us:

      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [Note] InnoDB: The first specified data file ./ibdata1 did not exist: a new database to be created!
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [Note] InnoDB: Setting file ./ibdata1 size to 12 MB
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [Note] InnoDB: Database physically writes the file full: wait...
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [Note] InnoDB: Setting log file ./ib_logfile101 size to 48 MB
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [Note] InnoDB: Setting log file ./ib_logfile1 size to 48 MB
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03 01:26:26 7f82b940e900 InnoDB: Error: Write to file ./ib_logfile101 failed at offset 0.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: 512 bytes should have been written, only 0 were written.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Operating system error number 22.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Check that your OS and file system support files of this size.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Check also that the disk is not full or a disk quota exceeded.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Error number 22 means 'Invalid argument'.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Some operating system error numbers are described at
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03 01:26:26 7f82b940e900  InnoDB: Operating system error number 22 in a file operation.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Error number 22 means 'Invalid argument'.
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: Some operating system error numbers are described at
      May  3 01:26:26 france mysqld_safe[3200]: InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
      May  3 01:26:26 france mysqld_safe[3200]:  InnoDB: Operation os_file_write_func to file /home/buildbot/buildbot/build/mariadb-10.1.13/storage/xtradb/os/os0file.cc and at line 5062
      May  3 01:26:26 france mysqld_safe[3200]: 2016-05-03  1:26:26 140199430514944 [ERROR] InnoDB: File ./ib_logfile101: 'os_file_write_func' returned OS error 222. Cannot continue operation
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: Installation of system tables failed!  Examine the logs in
      May  3 01:26:26 france mysqld_safe[3200]: /var/lib/mysql for more information.
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: The problem could be conflicting information in an external
      May  3 01:26:26 france mysqld_safe[3200]: my.cnf files. You can ignore these by doing:
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]:     shell> /usr/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: You can also try to start the mysqld daemon with:
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]:     shell> /usr/sbin/mysqld --skip-grant --general-log &
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: and use the command line tool /usr/bin/mysql
      May  3 01:26:26 france mysqld_safe[3200]: to connect to the mysql database and look at the grant tables:
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]:     shell> /usr/bin/mysql -u root mysql
      May  3 01:26:26 france mysqld_safe[3200]:     mysql> show tables;
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: Try 'mysqld --help' if you have problems with paths.  Using
      May  3 01:26:26 france mysqld_safe[3200]: --general-log gives you a log in /var/lib/mysql that may be helpful.
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: The latest information about mysql_install_db is available at
      May  3 01:26:26 france mysqld_safe[3200]: https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
      May  3 01:26:26 france mysqld_safe[3200]: MariaDB is hosted on launchpad; You can find the latest source and
      May  3 01:26:26 france mysqld_safe[3200]: email lists at http://launchpad.net/maria
      May  3 01:26:26 france mysqld_safe[3200]:
      May  3 01:26:26 france mysqld_safe[3200]: Please check all of the above before submitting a bug report
      May  3 01:26:26 france mysqld_safe[3200]: at http://mariadb.org/jira
      

      Looks to me like MariaDB's InnoDB engine can't handle the 4k logical sector size and assumes the system is using 512 bytes, which is still very common.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gijs007 Gijs van der Velden
            Votes:
            0 Vote for this issue
            Watchers:
            4 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.