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

Data Directory bug

    XMLWordPrintable

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

          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.