[MDEV-4159] Failed to set O_DIRECT... Created: 2013-02-09 Updated: 2013-02-12 Resolved: 2013-02-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 5.5.29 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Gabriel PREDA | Assignee: | Elena Stepanova |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | xtradb | ||
| Environment: |
CentOS 6.3 |
||
| Description |
|
Using as data directory a partition mounted like [root@mysql mysql]# cat /etc/fstab | grep data Will result in: 130209 12:37:54 InnoDB: Failed to set O_DIRECT on file ./a/b.ibd: CREATE: Invalid argument, continuing anyway For every InnoDB table (even for innodb_data) 130209 12:29:41 InnoDB: Failed to set O_DIRECT on file ./innodb_data: OPEN: Invalid argument, continuing anyway |
| Comments |
| Comment by Gabriel PREDA [ 2013-02-09 ] |
|
MySQL Bug 26662 -> http://bugs.mysql.com/bug.php?id=26662 Also please note that /data is a partition on a software RAID. [root@mysql mysql]# hdparm -W /dev/sda [root@mysql mysql]# hdparm -W /dev/sdb |
| Comment by Elena Stepanova [ 2013-02-09 ] |
|
I'm not getting the warning with a similar disk configuration (no raid though, and I'm operating inside a VM, so maybe either of that makes the difference). |
| Comment by Gabriel PREDA [ 2013-02-10 ] |
|
Yes they do go away if I turn off data journal. So which option is recommended? data=journal and no O_DIRECT vs. default data journal + O_DIRECT Anyway... the warning is not correct as I'm not on a tmpfs. |
| Comment by Elena Stepanova [ 2013-02-10 ] |
|
Well, the warning doesn't really say that you are on tmpfs, it just suggests it as one possible reason. My guess (which might be wrong though) is that the attempt to set O_DIRECT fails not on InnoDB level, but deeper, and InnoDB has no way to know why exactly it failed. If that's so, all that could be done is add yet another possible reason to the warning text, but I really don't think it's wise because a warning message cannot cover all possible wrong combinations of storage options on all file systems. It can and should be added to a troubleshooting section of documentation though. For the recommended options, it obviously depends on your priorities and workflow. The effect of setting innodb_flush_method to O_DIRECT can be either positive or negative, and the only reliable advice (even the documented one: http://dev.mysql.com/doc/refman/5.5/en/innodb-parameters.html#sysvar_innodb_flush_method) is to benchmark your configuration with the workflow similar to real one to decide whether it works for you. |
| Comment by Kristian Nielsen [ 2013-02-11 ] |
|
As I understand it, innodb was in this case configured to use O_DIRECT with innodb_flush_method = O_DIRECT And the data directory was on a file system that does not support O_DIRECT. In It could be nice to clarify the warning. I would suggest report it to With respect to recommendations: I would say that data-journal would not |
| Comment by Elena Stepanova [ 2013-02-12 ] |
|
Based on the comments above, I'm closing it as "won't fix" (which relates to the warning text which we would like to keep in sync with the one in MySQL version for now; the rest is not a bug). I don't have a good suggestion for a better wording for the warning; if you do, please either submit a report for MySQL, or add it here so we could file it on your behalf. Please note however that the warning should not be too verbose since it already floods the error log as it is. On the documentation side, I have added a comment to our mysqld options page in the KB: |