Details

    Description

      Hi All,

      I'm running these rpms:

      MariaDB-common-10.1.12-1
      MariaDB-server-10.1.12-1
      MariaDB-test-10.1.12-1
      MariaDB-shared-10.1.12-1
      MariaDB-connect-engine-10.1.12-1
      MariaDB-client-10.1.12-1
      MariaDB-compat-10.1.12-1
      

      I've created a directory /drbd2

      # ls -al /drbd2
      total 28
      drwxr-xr-x  4 mysql mysql  4096 Mar  3 13:58 .
      drwxr-xr-x 31 root  root   4096 Mar  3 12:11 ..
      drwxrwx---  2 mysql mysql  4096 Mar  3 13:58 radius
      drwx------  2 mysql mysql 16384 Mar  3 12:12 lost+found
      

      When I try to create a myisam with Data Directory it works:

      CREATE TABLE `radacct3` (
         `radacctid` bigint(20) NOT NULL AUTO_INCREMENT,   `acctsessionid` varchar(64) NOT NULL DEFAULT '',   `acctuniqueid` varchar(32) NOT NULL DEFAULT '',   `username` varchar(64) NOT NULL DEFAULT '',   `groupname` varchar(64) NOT NULL DEFAULT '',   `realm` varchar(64) DEFAULT '',   `nasipaddress` varchar(15) NOT NULL DEFAULT '',   `nasportid` varchar(15) DEFAULT NULL,   `nasporttype` varchar(32) DEFAULT NULL,   `acctstarttime` datetime DEFAULT NULL,   `acctstoptime` datetime DEFAULT NULL,   `acctsessiontime` int(11) DEFAULT NULL,   `acctauthentic` varchar(32) DEFAULT NULL,   `connectinfo_start` varchar(50) DEFAULT NULL,   `connectinfo_stop` varchar(50) DEFAULT NULL,   `acctinputoctets` bigint(20) DEFAULT NULL,   `acctoutputoctets` bigint(20) DEFAULT NULL,   `calledstationid` varchar(50) NOT NULL DEFAULT '',   `callingstationid` varchar(50) NOT NULL DEFAULT '',   `acctterminatecause` varchar(32) NOT NULL DEFAULT '',   `servicetype` varchar(32) DEFAULT NULL,   `framedprotocol` varchar(32) DEFAULT NULL,   `framedipaddress` varchar(15) NOT NULL DEFAULT '',   `acctstartdelay` int(11) DEFAULT NULL,   `acctstopdelay` int(11) DEFAULT NULL,   `acctupdatetime` datetime DEFAULT NULL,   `deleted` char(1) DEFAULT '',   `objectclass` varchar(64) DEFAULT 'AAA-SessionInfo',   PRIMARY KEY (`radacctid`),   KEY `username` (`username`),   KEY `framedipaddress` (`framedipaddress`),   KEY `acctsessionid` (`acctsessionid`),   KEY `acctsessiontime` (`acctsessiontime`),   KEY `acctuniqueid` (`acctuniqueid`),   KEY `acctstarttime` (`acctstarttime`),   KEY `acctstoptime` (`acctstoptime`),   KEY `nasipaddress` (`nasipaddress`),   KEY `acctupdatetime` (`acctupdatetime`),   KEY `deleted` (`deleted`),   KEY `objectclass` (`objectclass`) 
      ) ENGINE=Myisam data directory='/drbd2';
      Query OK, 0 rows affected (0.00 sec)
      

      # ls -al /drbd2/
      total 28
      drwxr-xr-x  4 mysql mysql  4096 Mar  3 14:12 .
      drwxr-xr-x 31 root  root   4096 Mar  3 12:11 ..
      drwxrwx---  2 mysql mysql  4096 Mar  3 13:58 radius
      drwx------  2 mysql mysql 16384 Mar  3 12:12 lost+found
      -rw-rw----  1 mysql mysql     0 Mar  3 14:12 radacct3.MYD
      

      MariaDB [ant_truauth]> drop table radacct3;
      Query OK, 0 rows affected (0.00 sec)
      

      So it looks like it correctly puts the myisam data file in the /drbd2 directory.
      However creating a table with Innodb seems to fail and I can't figure out the answer.
      The radacct3.idb file should have been created in the /drbd2/radius/ directory.

      MariaDB [ant_truauth]> CREATE TABLE `radacct3` (
         `radacctid` bigint(20) NOT NULL AUTO_INCREMENT,   `acctsessionid` varchar(64) NOT NULL DEFAULT '',   `acctuniqueid` varchar(32) NOT NULL DEFAULT '',   `username` varchar(64) NOT NULL DEFAULT '',   `groupname` varchar(64) NOT NULL DEFAULT '',   `realm` varchar(64) DEFAULT '',   `nasipaddress` varchar(15) NOT NULL DEFAULT '',   `nasportid` varchar(15) DEFAULT NULL,   `nasporttype` varchar(32) DEFAULT NULL,   `acctstarttime` datetime DEFAULT NULL,   `acctstoptime` datetime DEFAULT NULL,   `acctsessiontime` int(11) DEFAULT NULL,   `acctauthentic` varchar(32) DEFAULT NULL,   `connectinfo_start` varchar(50) DEFAULT NULL,   `connectinfo_stop` varchar(50) DEFAULT NULL,   `acctinputoctets` bigint(20) DEFAULT NULL,   `acctoutputoctets` bigint(20) DEFAULT NULL,   `calledstationid` varchar(50) NOT NULL DEFAULT '',   `callingstationid` varchar(50) NOT NULL DEFAULT '',   `acctterminatecause` varchar(32) NOT NULL DEFAULT '',   `servicetype` varchar(32) DEFAULT NULL,   `framedprotocol` varchar(32) DEFAULT NULL,   `framedipaddress` varchar(15) NOT NULL DEFAULT '',   `acctstartdelay` int(11) DEFAULT NULL,   `acctstopdelay` int(11) DEFAULT NULL,   `acctupdatetime` datetime DEFAULT NULL,   `deleted` char(1) DEFAULT '',   `objectclass` varchar(64) DEFAULT 'AAA-SessionInfo',   PRIMARY KEY (`radacctid`),   KEY `username` (`username`),   KEY `framedipaddress` (`framedipaddress`),   KEY `acctsessionid` (`acctsessionid`),   KEY `acctsessiontime` (`acctsessiontime`),   KEY `acctuniqueid` (`acctuniqueid`),   KEY `acctstarttime` (`acctstarttime`),   KEY `acctstoptime` (`acctstoptime`),   KEY `nasipaddress` (`nasipaddress`),   KEY `acctupdatetime` (`acctupdatetime`),   KEY `deleted` (`deleted`),   KEY `objectclass` (`objectclass`) 
      ) ENGINE=Innodb data directory='/drbd2';
      ERROR 1005 (HY000): Can't create table `radius`.`radacct3` (errno: -1 "Internal error < 0 (Not system error)")
      

      The mysql.log shows:

      2016-03-03 13:58:19 2aaebe6eed40 InnoDB: Error: Write to file ./radius/radacct3.isl failed at offset 0.
      InnoDB: 31 bytes should have been written, only 0 were written.
      InnoDB: Operating system error number 22.
      InnoDB: Check that your OS and file system support files of this size.
      InnoDB: Check also that the disk is not full or a disk quota exceeded.
      InnoDB: Error number 22 means 'Invalid argument'.
      InnoDB: Some operating system error numbers are described at
      InnoDB: http://dev.mysql.com/doc/refman/5.6/en/operating-system-error-codes.html
      

      I managed to do this with the i686 version, which I mistakenly installed as I thought was the 64bit version. After upgrading to the 64bit version of Mariadb it seems to fail.

      # df -h
      Filesystem            Size  Used Avail Use% Mounted on
      (removed the other directories)
      /dev/drbd2            7.7G  146M  7.2G   2% /drbd2
       
      # df -i
      Filesystem            Inodes   IUsed   IFree IUse% Mounted on
      (removed the other directories)
      /dev/drbd2           1024128      12 1024116    1% /drbd2
      

      Hence its not a diskspace or inode issue.
      There are no errors in /var/log/messages.

      Since I could created the myisam version I think permissions to the directory is fine for mariadb to create the files.

      Any idea what is wrong?

      Regards,

      Michael

      Attachments

        Activity

          Michaelv,
          We don't have information about 10.2 release date yet, but it's not going to become production-ready any time soon.
          For whether the fix will be ported to 10.1, let's wait for jplindst decision, he's an innoDB expert and will be able to conclude whether it is technically possible and safe enough to have it in 10.1.

          elenst Elena Stepanova added a comment - Michaelv , We don't have information about 10.2 release date yet, but it's not going to become production-ready any time soon. For whether the fix will be ported to 10.1, let's wait for jplindst decision, he's an innoDB expert and will be able to conclude whether it is technically possible and safe enough to have it in 10.1.

          Hmm, what file system you have on that directory, I could not yet repeat using DATA_DIRECTORY='/home/jan' but I have:

          /dev/sdb1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
          

          jplindst Jan Lindström (Inactive) added a comment - Hmm, what file system you have on that directory, I could not yet repeat using DATA_DIRECTORY='/home/jan' but I have: /dev/sdb1 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)

          commit f71c45c71db8c7862fc50b8382ccdbff4772e258
          Author: Jan Lindström <jan.lindstrom@mariadb.com>
          Date: Tue Mar 22 17:55:23 2016 +0200

          MDEV-9678: Data Directory bug

          Problem was that link file (.isl) is also opened using O_DIRECT
          mode and if this fails the whole create table fails on internal
          error.

          Fixed by not using O_DIRECT on link files as they are used only
          on create table and startup and do not contain real data.
          O_DIRECT failures are successfully ignored for data files
          if O_DIRECT is not supported by file system on used
          data directory.

          jplindst Jan Lindström (Inactive) added a comment - commit f71c45c71db8c7862fc50b8382ccdbff4772e258 Author: Jan Lindström <jan.lindstrom@mariadb.com> Date: Tue Mar 22 17:55:23 2016 +0200 MDEV-9678 : Data Directory bug Problem was that link file (.isl) is also opened using O_DIRECT mode and if this fails the whole create table fails on internal error. Fixed by not using O_DIRECT on link files as they are used only on create table and startup and do not contain real data. O_DIRECT failures are successfully ignored for data files if O_DIRECT is not supported by file system on used data directory.
          filotti Ariel Filotti added a comment -

          I was using innodb_flush_method = O_DIRECT in my server config. This is recommended in the Percona Configuration Wizard:

          "If you are using Linux, then you should usually open files in O_DIRECT mode unless you know that another method is better."

          After applying this commit, the performance of the slave SQL thread decreased tenfold, to the point where the slave started to lag behind the master. I had to remove innodb_flush_method from the server config, and then the performance got back up to where it used to be.

          I tested this on CentOS 7 and Ubuntu 16.04 (Beta2).

          filotti Ariel Filotti added a comment - I was using innodb_flush_method = O_DIRECT in my server config. This is recommended in the Percona Configuration Wizard: "If you are using Linux, then you should usually open files in O_DIRECT mode unless you know that another method is better." After applying this commit, the performance of the slave SQL thread decreased tenfold, to the point where the slave started to lag behind the master. I had to remove innodb_flush_method from the server config, and then the performance got back up to where it used to be. I tested this on CentOS 7 and Ubuntu 16.04 (Beta2).
          axel Axel Schwenke added a comment -

          filotti - this regression is MDEV-9916. It's a pity that your comment wasn't noticed before.

          axel Axel Schwenke added a comment - filotti - this regression is MDEV-9916 . It's a pity that your comment wasn't noticed before.

          People

            jplindst Jan Lindström (Inactive)
            Michaelv Michael Van Der Beek
            Votes:
            0 Vote for this issue
            Watchers:
            6 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.