raw

Bug #1692844 reported by saintlee
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC
New
Undecided
Unassigned

Bug Description

When I try to use the raw device in the percona extradb cluster, it becomes these errors:

017-05-23T08:01:46.475945Z 0 [ERROR] InnoDB: Header page consists of zero bytes in datafile: /dev/raw/raw2, Space ID:0, Flags: 0. Please refer to http://dev.mysql.com/doc/refman/5.7/en/innodb-troubleshooting-datadict.html for how to resolve the issue.
2017-05-23T08:01:46.476040Z 0 [ERROR] InnoDB: Corrupted page [page id: space=0, page number=0] of datafile '/dev/raw/raw2' could not be found in the doublewrite buffer.
2017-05-23T08:01:46.476112Z 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2017-05-23T08:01:47.577746Z 0 [ERROR] Plugin 'InnoDB' init function returned error.
2017-05-23T08:01:47.577819Z 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2017-05-23T08:01:47.577831Z 0 [ERROR] Failed to initialize plugins.
2017-05-23T08:01:47.577838Z 0 [ERROR] Aborting

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the report.

I cannot repeat described behavior: InnoDB starts normally with raw device. Please send us your configuration file(-s) and commands you use to start cluster node(-s).

Changed in percona-xtradb-cluster:
status: New → Incomplete
Revision history for this message
saintlee (saintlee) wrote :

Hi, expert,there is my environment.
this is my configuration file:
[mysqld]
datadir=/var/lib/mysql
user=mysql
wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
wsrep_cluster_name=pxc-cluster
wsrep_cluster_address=gcomm://98.0.15.31,98.0.15.32,98.0.15.33
innodb_buffer_pool_size=16M
innodb_data_home_dir=
innodb_data_file_path=/dev/raw/raw2:500Mnewraw
wsrep_node_name=pxc1
wsrep_node_address=98.0.15.31
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sstuser:123456
pxc_strict_mode=ENFORCING
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2

this is my commands:
#make a raw device
dd if=/dev/zero of=asmdisk1 bs=1024k count=600
losetup /dev/loop2 asmdisk1
raw /dev/raw/raw1 /dev/loop2
chown mysql:mysql /dev/raw/raw1
chmod 660 /dev/raw/raw1

#start the bootstrap node
service mysql@bootstrap start

Revision history for this message
saintlee (saintlee) wrote :

Then ,I change a new way to create a raw device.I add a new disk to my virtual machine and reboot my vm.
Then I get a new clear disk: sdb.
I bind it to the raw device.
raw /dev/raw/raw1 /dev/sdb
chown mysql:mysql /dev/raw/raw1
chmod 660 /dev/raw/raw1

vim /etc/my.cnf
  innodb_data_file_path=/dev/raw/raw1:2Gnewraw

#start the bootstrap node
 service mysql@bootstrap start

I got these errors:
[ERROR] InnoDB: The size of tablespace file /dev/raw/raw1 is only 0, should be at least 65536!
2017-05-24 17:35:18 0x7f7bf4847880 InnoDB: Assertion failure in thread 140170360027264 in file fil0fil.cc line 795
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.7/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
09:35:18 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
Attempting to collect some information that could help diagnose the problem.
As this is a crash and something is definitely wrong, the information
collection process might fail.
Please help us make Percona XtraDB Cluster better by reporting any
bugs at https://bugs.launchpad.net/percona-xtradb-cluster

Revision history for this message
saintlee (saintlee) wrote :
Download full text (12.6 KiB)

Here is my whole log:

2017-05-24T09:31:23.473308Z 0 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a maste
r and has his hostname changed!! Please use '--log-bin=localhost-bin' to avoid this problem.
 100 200 300 400 500 600 700 800 900 1000 1100 1200 1300 1400 1500 1600 1700 1800 1900 2000 2100 2200 2300 2400 2500 2600 2700 2800 2900 3000 3100 3200 3300 3400 3500 3600 3700
 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700 4800 4900 5000 5100 5200 5300 5400 5500 5600 5700 5800 5900 6000 6100 6200 6300 6400 6500 6600 6700 6800 6900 7000 7100 7200
7300 7400 7500 7600 7700 7800 7900 8000 8100 8200 8300 8400 8500 8600 8700 8800 8900 9000 9100 9200 9300 9400 9500 9600 9700 9800 9900 10000 10100 10200 10300 10400 10500 10600
 10700 10800 10900 11000 11100 11200 11300 11400 11500 11600 11700 11800 11900 12000 12100 12200 12300 12400 12500 12600 12700 12800 12900 13000 13100 13200 13300 13400 13500 1
3600 13700 13800 13900 14000 14100 14200 14300 14400 14500 14600 14700 14800 14900 15000 15100 15200 15300 15400 15500 15600 15700 15800 15900 16000 16100 16200 16300
2017-05-24T09:35:05.396531Z 0 [Warning] InnoDB: New log files created, LSN=45791
2017-05-24T09:35:05.629103Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-05-24T09:35:05.689381Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 4504
1a5b-4064-11e7-be5d-005056b3e971.
2017-05-24T09:35:05.767073Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-05-24T09:35:05.949789Z 0 [Warning] CA certificate ca.pem is self signed.
2017-05-24T09:35:06.005034Z 1 [Note] A temporary password is generated for root@localhost: vXVrzfJkQ3)k
2017-05-24T09:35:17.720123Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for m
ore details).
2017-05-24T09:35:17.722648Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.17-11-57-log) starting as process 3010 ...
2017-05-24T09:35:17.726423Z 0 [Warning] No argument was provided to --log-bin, and --log-bin-index was not used; so replication may break when this MySQL server acts as a maste
r and has his hostname changed!! Please use '--log-bin=localhost-bin' to avoid this problem.
2017-05-24T09:35:17.726725Z 0 [Note] WSREP: Read nil XID from storage engines, skipping position init
2017-05-24T09:35:17.726742Z 0 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera3/libgalera_smm.so'
2017-05-24T09:35:18.423995Z 0 [Note] WSREP: wsrep_load(): Galera 3.20(r7e383f7) by Codership Oy <email address hidden> loaded successfully.
2017-05-24T09:35:18.424210Z 0 [Note] WSREP: CRC-32C: using hardware acceleration.
2017-05-24T09:35:18.425026Z 0 [Warning] WSREP: Could not open state file for reading: '/var/lib/mysql//grastate.dat'
2017-05-24T09:35:18.425269Z 0 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootsrap: 1
2017-05-24T09:35:18.431655Z 0 [Note] WSREP: Passing config to GCS: base_dir = /var/li...

Revision history for this message
Sveta Smirnova (svetasmirnova) wrote :

Thank you for the feedback.

I assume in the first case (with raw device, created with help of dd command) your server starts fine?

For the second case, please, check if you have innodb_data_home_dir= specified in the configuration file: error message looks very similar to the case when this option missed.

Changed in percona-xtradb-cluster:
status: Incomplete → New
status: New → Incomplete
Revision history for this message
saintlee (saintlee) wrote :

Thanks for the reply,there is 'innodb_data_home_dir=' in the /etc/my.cnf.

Changed in percona-xtradb-cluster:
status: Incomplete → New
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PXC-1982

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

  • Percona XtraDB Cluster moved to https://jira.percona.com/projects/PXC: raw device

Remote bug watches

Bug watches keep track of this bug in other bug trackers.