Creating a new InnoDB data file, or using an existing InnoDB data file, with a raw device isn't working with mariadb100-server-10.0.15. ##CONFIG## innodb_data_home_dir= innodb_data_file_path = /dev/zvol/zroot/test:8G(new)raw ##ERROR## [ERROR] InnoDB: '/dev/zvol/zroot/test' not a regular file. #### ########## This works as expected with mariadb55-server. Apparently this was fixed with in version 10.0.11, but maybe the patch to os_file_get_status doesn't work for FreeBSD or ZFS ZVOLs. https://mariadb.atlassian.net/browse/MDEV-6057 Looking at the comments, a Debian user also had a problem, on version 10.0.15, with raw partitions on LVM (linux software raid).
I'll test a raw device partition directly when I have a chance to see if we can isolate this issue to ZFS ZVOLs, or if it's an issue related to FreeBSD. My MariaDB bug report can be seen here. https://mariadb.atlassian.net/browse/MDEV-7480
Fix Summary and notify maintainer.
I tested with a raw device partition (USB stick) using mariadb100-server-10.0.15 and also with mysql56-server-5.6.22 In no cases do raw device partitions work. This leads me to believe this issue is specific to the "os_file_get_status" function and FreeBSD (not ZVOLs or MariaDB).
Digging in... For MySQL 5.6/10.0.10 problems this was fixed by http://bazaar.launchpad.net/~mysql/mysql-server/5.6/revision/5664 Will check further later.
I submitted a bug to the MySQL project here. http://bugs.mysql.com/bug.php?id=75616&thanks=4
I believe I found the source of this issue. FreeBSD doesn't present disks as block devices but instead as character devices. I believe "case S_IFCHR:" should be added directly before or after "case S_IFBLK:" here.. http://bazaar.launchpad.net/~mysql/mysql-server/5.6/view/head:/storage/innobase/os/os0file.cc#L3167
Forgot to cite my source https://www.freebsd.org/doc/en/books/arch-handbook/driverbasics-block.html
Hi Joshua, Can you verify that your solution fixes this issue? And provide the diff as an attachment to this PR? I'll then follow up with with upstream to include this in the next version. Thanks in advance!
I was actually planning in working on it today. just replacing S_IFBLK with S_IFCHAR complains I didn't include it somewhere. don't know anything about 'C' some I'm stumbling my way through. mariadb said they would rather upstream fix this, mysql has been spotty to respond. but I think they will eventually fix it because it affects multiple OSs as well.
my earlier issue was I tried S_IFCHAR, but it should be S_IFCHR. I was able to compile mariadb100-server with this change. But, mysql is still not starting. I believe more changes/additions are needed to support character devices. I'll attach my mysql startup log. Also, here is where support for block devices was re-added for mysql5.6 https://github.com/mysql/mysql-server/commit/dfc103a0474d1d772b52cb03c71c2821a002d89c#diff-28ed40e7ccec6683ebd46da2ca82d01c
Created attachment 153284 [details] MySQL startup error log
Looks like this may have been fixed in mysql 5.6.25. I'm hoping that port gets updated soon so I can test it out. https://github.com/mysql/mysql-server/commit/aee6bc8ed15e14fb2a532cd0ebffa0ec161c0e77 I don't think the fix has been applied to mariadb yet so I'll inform them so it can hopefully be merged in at some point.
OK, the fixed got merged into mariadb10.0 https://github.com/MariaDB/server/commit/3bbffc211945f99f9bba806e7031bea6b73a1993 So, the next time they release a new version, and we update the FreeBSD port, this should be fixed.
A new version of mariadb with this fix, version 10.0.21 has been released. Once this port has been updated this issue should be closed.
Over to new maintainer.
Hi Josh, Can you confirm that raw devices are working with the new 10.0.21 port? Thanks a LOT! Bernard.
I can confirm v10.0.21 is partially working. WORKS initiate innodb raw device on mariadb55 (newraw) > mariadb100 (raw) DOESN'T WORK initiate innodb raw device on mariadb100 (newraw) > mariadb100 (raw) From the attached logs I believe newraw isn't initiating the storage on mariadb100. I'll attached logs of.. * mariadb55 initiating (newraw) and using a raw device (raw) * mariadb100 initiating (newraw) and using a raw device (raw) * mariadb100 using a file (not specifying innodb location)
Created attachment 159901 [details] mariadb55 raw
Created attachment 159902 [details] mariadb100 raw - errors
Created attachment 159903 [details] mariadb100 file
My personal problem is fixed, as I'll be upgrading from mariadb55. But, others who start from mariadb100 (and probably mysql56) won't be able to initiate their raw device.