Bug #75646 '/dev/raw/raw1' not a regular file
Description:
We got this problem while upgrading our mysql servser from 5.5 to 5.6,
And also in build a new mysql database.
InnoDB refuses to use the existing raw device.
Configuring newraw does nothing either.
System: Ubuntu 1410
Mysql: Ubuntu package 5.6.19-1
InnoDB using a raw partition.
version:
guo@guo-desktop:~$ sudo uname -a
Linux guo-desktop 3.16.0-29-generic #39-Ubuntu SMP Mon Dec 15 22:27:29 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
guo@guo-desktop:~$ sudo mysqld --version
mysqld Ver 5.6.19-1~exp1ubuntu2 for debian-linux-gnu on x86_64 ((Ubuntu))
guo@guo-desktop:~$
We use stand raw device in our linux computer. We use mysql as database system .
in the old version such as mysql 5.5, we have done a lots times, succes use raw device in mysql.
but we could not use it in mysql 5.6.19.
we use many technique things in mysql.
For example, We used 2 and more harddisk to build soft raid1 or soft raid1+0,
we also use ssd(or ssd raid) as a flashcache on harddisk raid,
then we bind /dev/raw/raw1 on flashcache mapper.
use in mysql 5.6.19, In fact, we found that we only binded a disk to raw, such as
raw /dev/raw/raw1 /dev/sdf1
We still could not start mysql .
this is our test:
1) because raw module now did not loaded by default in ubuntu system, we added "raw" line in file /etc/modules,
after reboot system, we could see the raw module had been started.
guo@guo-desktop:~$ sudo cat /etc/modules
# /etc/modules: kernel modules to load at boot time.
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
# Parameters can be specified after the module name.
raw
guo@guo-desktop:~$
guo@guo-desktop:~$ sudo lsmod|grep raw
serio_raw 13434 0
snd_rawmidi 30876 1 snd_seq_midi
snd_seq_device 14497 3 snd_seq,snd_rawmidi,snd_seq_midi
snd 87611 21 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel,snd_seq_device
raw 13091 1
guo@guo-desktop:~$
2) We bind the raw device, we can see the raw device success binded.
We alse change the own of the raw device to mysql
guo@guo-desktop:~$ sudo raw /dev/raw/raw1 /dev/vghd/p2
/dev/raw/raw1: bound to major 252, minor 2
We alse tested normal harddisk, example: sudo raw /dev/raw/raw1 /dev/sdf1, It is the same result.
guo@guo-desktop:~$
guo@guo-desktop:~$ sudo ls -l /dev/raw/raw1
crw-rw---- 1 root disk 162, 1 1月 27 16:26 /dev/raw/raw1
guo@guo-desktop:~$
guo@guo-desktop:~$ sudo chown mysql /dev/raw/raw1
guo@guo-desktop:~$ sudo ls -l /dev/raw/raw1
crw-rw---- 1 mysql disk 162, 1 1月 27 16:26 /dev/raw/raw1
guo@guo-desktop:~$
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ibdata1
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ib_logfile0
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ib_logfile1
config /etc/mysql/my.cnf line:
innodb_data_home_dir=
innodb_data_file_path=/dev/raw/raw1:800Gnewraw
guo@guo-desktop:~$ sudo service mysql stop
guo@guo-desktop:~$ sudo service mysql start
error-log:
2015-01-27 12:29:39 3769 [Note] InnoDB: Completed initialization of buffer pool
2015-01-27 12:29:39 3769 [ERROR] InnoDB: '/dev/raw/raw1' not a regular file.
2015-01-27 12:29:39 3769 [ERROR] InnoDB: The system tablespace must be writable!
2015-01-27 12:29:39 3769 [ERROR] Plugin 'InnoDB' init function returned error.
2015-01-27 12:29:39 3769 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-01-27 12:29:39 3769 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-01-27 12:29:39 3769 [ERROR] Aborting
3) In usually, We do not change own of raw device as 2), we bind a node to raw device, then it is more security,
because ubuntu apparmor restrict access other catalog 。
guo@guo-desktop:~$ sudo ls -lL /dev/raw/raw1
crw-rw---- 1 root disk 162, 1 1月 27 12:09 /dev/raw/raw1
guo@guo-desktop:~$ sudo mknod /var/lib/mysql/myraw1 c 162 1
guo@guo-desktop:~$ sudo chown mysql:mysql /var/lib/mysql/myraw1
guo@guo-desktop:~$ sudo ls -l /var/lib/mysql/myraw1
crw-r--r-- 1 mysql mysql 162, 1 1月 27 12:14 /var/lib/mysql/myraw1
config /etc/mysql/my.cnf line:
innodb_data_home_dir=
innodb_data_file_path=/var/lib/mysql/myraw1:800Gnewraw
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ibdata1
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ib_logfile0
guo@guo-desktop:~$ sudo rm /var/lib/mysql/ib_logfile1
guo@guo-desktop:~$ sudo service mysql stop
guo@guo-desktop:~$ sudo service mysql start
error-log:
2015-01-27 12:21:03 3584 [Note] InnoDB: Completed initialization of buffer pool
2015-01-27 12:21:03 3584 [ERROR] InnoDB: '/var/lib/mysql/myraw1' not a regular file.
2015-01-27 12:21:03 3584 [ERROR] InnoDB: The system tablespace must be writable!
2015-01-27 12:21:03 3584 [ERROR] Plugin 'InnoDB' init function returned error.
2015-01-27 12:21:03 3584 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2015-01-27 12:21:03 3584 [ERROR] Unknown/unsupported storage engine: InnoDB
2015-01-27 12:21:03 3584 [ERROR] Aborting
How to repeat:
How to repeat:
Take a Ubuntu 1410 server or desktop version , install the mysql-package5.6:
guo@guo-desktop:~$ sudo apt-get install mysql-server-5.6
Try to configure a raw partition.
Look into the error log.
Suggested fix:
No clue :( Only known raw device can work in 5.5 or old version, but can not be used in 5.6 :|
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.055 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.