Flashcache throws an error on startup when flashcache is not used
Bug #747032 reported by
Aurimas Mikalauskas
This bug affects 8 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Wishlist
|
Sergei Glushchenko | ||
5.1 |
Fix Released
|
Wishlist
|
Sergei Glushchenko | ||
5.5 |
Fix Released
|
Wishlist
|
Sergei Glushchenko |
Bug Description
It's very confusing to have Percona Server error during startup - it is especially confusing if the server in fact fails to start, while the reason is not actually Flashcache. Here's the flashcache notices during the startup:
Mar 31 17:50:19 localhost mysqld: 110331 17:50:19 [Note] Flashcache bypass: disabled
Mar 31 17:50:19 localhost mysqld: 110331 17:50:19 [Note] Flashcache setup error is : ioctl failed
I think it would be best to suppress these unless flashcache device actually exists. Another way to approach this could be a flag to explicitly enable flashcache in Percona Server though I'm guessing that may break existing flashcache installations after upgrade.
Aurimas
Related branches
lp:~sergei.glushchenko/percona-server/disable-flashcache
- Alexey Kopytov (community): Approve
-
Diff: 227 lines (+71/-15)9 files modifiedPercona-Server/mysql-test/include/have_flashcache.inc (+7/-0)
Percona-Server/mysql-test/r/have_flashcache.require (+2/-0)
Percona-Server/mysql-test/r/percona_bug747032.result (+1/-0)
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+1/-0)
Percona-Server/mysql-test/r/percona_server_variables_release.result (+1/-0)
Percona-Server/mysql-test/t/percona_bug747032.test (+32/-0)
Percona-Server/sql/mysql_priv.h (+1/-0)
Percona-Server/sql/mysqld.cc (+25/-15)
Percona-Server/sql/set_var.cc (+1/-0)
lp:~sergei.glushchenko/percona-server/55-disable-flashcache
- Alexey Kopytov (community): Approve
-
Diff: 314 lines (+120/-14)13 files modifiedPercona-Server/mysql-test/include/have_flashcache.inc (+7/-0)
Percona-Server/mysql-test/r/have_flashcache.require (+2/-0)
Percona-Server/mysql-test/r/mysqld--help-notwin.result (+2/-0)
Percona-Server/mysql-test/r/mysqld--help-win.result (+2/-0)
Percona-Server/mysql-test/r/percona_bug747032.result (+1/-0)
Percona-Server/mysql-test/r/percona_server_variables_debug.result (+1/-0)
Percona-Server/mysql-test/r/percona_server_variables_release.result (+1/-0)
Percona-Server/mysql-test/suite/sys_vars/r/have_flashcache_basic.result (+21/-0)
Percona-Server/mysql-test/suite/sys_vars/t/have_flashcache_basic.test (+23/-0)
Percona-Server/mysql-test/t/percona_bug747032.test (+32/-0)
Percona-Server/sql/mysqld.cc (+23/-14)
Percona-Server/sql/set_var.h (+1/-0)
Percona-Server/sql/sys_vars.cc (+4/-0)
Changed in percona-server: | |
importance: | Undecided → Wishlist |
status: | New → Confirmed |
Changed in percona-server: | |
status: | Confirmed → Won't Fix |
status: | Won't Fix → Triaged |
tags: | added: i25495 |
Changed in percona-server: | |
assignee: | nobody → Sergei Glushchenko (sergei.glushchenko) |
status: | Triaged → In Progress |
Changed in percona-server: | |
milestone: | 5.1.65-14.0 → 5.1.66-14.1 |
To post a comment you must log in.
Hi,
this is due to the way mysql_data_home is set in init_cachedev. I resolved the issue of a customer by adding a "cd $datadir" in the init.d script. Looking at the strace of 5.5.20, I got:
statfs(".", {f_type=0x58465342, f_bsize=4096, f_blocks=67010513, f_bfree=60639395, f_bavail=60639395, f_files=268172992, f_ffree=268172980, f_fsid={2054, 0}, f_namelen=255, f_frsize=4096}) = S_IFREG| 0644, st_size=464, ...}) = 0 PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x7fd5c33b5000 "EXT2_SUPER_ MAGIC", f_bsize=4096, f_blocks=12901535, f_bfree=11879844, f_bavail=11224484, f_files=3276800, f_ffree=3176908, f_fsid={1141234244, 1206473618}, f_namelen=255 "PROC_SUPER_ MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
0
open("/etc/mtab", O_RDONLY) = 3
futex(0x318878c020, FUTEX_WAKE_PRIVATE, 2147483647) = 0
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(3, "/dev/sda2 / ext4 rw 0 0\nproc /pr"..., 4096) = 464
statfs("/", {f_type=
, f_frsize=4096}) = 0
statfs("/proc", {f_type=
so the target directory in $bindir which in the case of this customer, is on a different partition. Looking at the same extract from 5.1.60:
statfs( "/var/lib/ mysql/" , {f_type=0x58465342, f_bsize=4096, f_blocks=63446558, f_bfree=63175977, f_bavail=63175977, f_files=253910208, f_ffree=253910131, f_fsid={64768, 0}, f_namelen=255, f_ S_IFREG| 0644, st_size=464, ...}) = 0 PROT_WRITE, MAP_PRIVATE| MAP_ANONYMOUS, -1, 0) = 0x7f07718dd000 "EXT2_SUPER_ MAGIC", f_bsize=4096, f_blocks=12901535, f_bfree=12156233, f_bavail=11500873, f_files=3276800, f_ffree=3216720, f_fsid={439050054, -1249199248}, f_namelen=255 "PROC_SUPER_ MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0 "SYSFS_ MAGIC", f_bsize=4096, f_blocks=0, f_bfree=0, f_bavail=0, f_files=0, f_ffree=0, f_fsid={0, 0}, f_namelen=255, f_frsize=4096}) = 0
frsize=4096}) = 0
open("/etc/mtab", O_RDONLY) = 3
futex(0x365c18c020, FUTEX_WAKE_PRIVATE, 2147483647) = 0
fstat(3, {st_mode=
mmap(NULL, 4096, PROT_READ|
read(3, "/dev/sda2 / ext4 rw 0 0\nproc /pr"..., 4096) = 464
statfs("/", {f_type=
, f_frsize=4096}) = 0
statfs("/proc", {f_type=
statfs("/sys", {f_type=
Which now correctly consider /var/lib/mysql.
Yves