Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1449072

Summary: "mv /var/lib/mysql/mysql => /var/lib/mysql/mysql.tmp" also result in the deleting of /var/lib/mysql data
Product: Red Hat Enterprise Linux 7 Reporter: indicoliteplus
Component: mariadbAssignee: Michal Schorm <mschorm>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 7.1CC: databases-maint, hhorak, mmuzila
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-11 07:22:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description indicoliteplus 2017-05-09 07:46:23 UTC
Description of problem:
"mv /var/lib/mysql/mysql => /var/lib/mysql/mysql.tmp" also result in the deleting of /var/lib/mysql data

Version-Release number of selected component (if applicable):
Server version: 10.1.12-MariaDB MariaDB Server

How reproducible:
absolutely

Steps to Reproduce:
1. mv /var/lib/mysql/mysql => /var/lib/mysql/mysql.tmp
2. restart the node
expected: 
actually: 


Actual results:
still stopped, 
/var/lib/mysql/* is deleted....

Expected results:
the node will start as usual

Additional info:
below steps also result in the deleting of /var/lib/mysql data:
```
[root@bingo mysql]# pwd
/var/lib/mysql
[root@syluo mysql]# ls
aria_log.00000001  galera.cache        gvwstate.dat  ib_logfile1        mysql.sock          tc.log
aria_log_control   gcache.page.000006  ibdata1       multi-master.info  mysql_upgrade_info  test
fitos_sso          grastate.dat        ib_logfile0   mysql              performance_schema
[root@syluo mysql]# mv mysql mysql.temp
```
then restart the node,
still stopped,
acutally, /var/lib/mysql/* is empty.

```
Server version: 10.1.12-MariaDB MariaDB Server

Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> show status like '%wsrep%';
+------------------------------+----------------------------------------------+
| Variable_name                | Value                                        |
+------------------------------+----------------------------------------------+
| wsrep_apply_oooe             | 0.000000                                     |
| wsrep_apply_oool             | 0.000000                                     |
| wsrep_apply_window           | 0.000000                                     |
| wsrep_causal_reads           | 0                                            |
| wsrep_cert_deps_distance     | 0.000000                                     |
| wsrep_cert_index_size        | 0                                            |
| wsrep_cert_interval          | 0.000000                                     |
| wsrep_cluster_conf_id        | 1                                            |
| wsrep_cluster_size           | 1                                            |
| wsrep_cluster_state_uuid     | cbfa2e0f-3486-11e7-b2d1-b3288aae4c06         |
| wsrep_cluster_status         | Primary                                      |
| wsrep_commit_oooe            | 0.000000                                     |
| wsrep_commit_oool            | 0.000000                                     |
| wsrep_commit_window          | 0.000000                                     |
| wsrep_connected              | ON                                           |
| wsrep_evs_delayed            |                                              |
| wsrep_evs_evict_list         |                                              |
| wsrep_evs_repl_latency       | 1.137e-06/4.2208e-06/8.371e-06/2.80406e-06/5 |
| wsrep_evs_state              | OPERATIONAL                                  |
| wsrep_flow_control_paused    | 0.000000                                     |
| wsrep_flow_control_paused_ns | 0                                            |
| wsrep_flow_control_recv      | 0                                            |
| wsrep_flow_control_sent      | 0                                            |
| wsrep_gcomm_uuid             | a7d8359d-3486-11e7-811e-13d29a7b53b4         |
| wsrep_incoming_addresses     | 192.168.101.141:3306                         |
| wsrep_last_committed         | 0                                            |
| wsrep_local_bf_aborts        | 0                                            |
| wsrep_local_cached_downto    | 18446744073709551615                         |
| wsrep_local_cert_failures    | 0                                            |
| wsrep_local_commits          | 0                                            |
| wsrep_local_index            | 0                                            |
| wsrep_local_recv_queue       | 0                                            |
| wsrep_local_recv_queue_avg   | 0.500000                                     |
| wsrep_local_recv_queue_max   | 2                                            |
| wsrep_local_recv_queue_min   | 0                                            |
| wsrep_local_replays          | 0                                            |
| wsrep_local_send_queue       | 0                                            |
| wsrep_local_send_queue_avg   | 0.000000                                     |
| wsrep_local_send_queue_max   | 1                                            |
| wsrep_local_send_queue_min   | 0                                            |
| wsrep_local_state            | 4                                            |
| wsrep_local_state_comment    | Synced                                       |
| wsrep_local_state_uuid       | cbfa2e0f-3486-11e7-b2d1-b3288aae4c06         |
| wsrep_protocol_version       | 7                                            |
| wsrep_provider_name          | Galera                                       |
| wsrep_provider_vendor        | Codership Oy <info>            |
| wsrep_provider_version       | 3.12(r9921e73)                               |
| wsrep_ready                  | ON                                           |
| wsrep_received               | 2                                            |
| wsrep_received_bytes         | 144                                          |
| wsrep_repl_data_bytes        | 0                                            |
| wsrep_repl_keys              | 0                                            |
| wsrep_repl_keys_bytes        | 0                                            |
| wsrep_repl_other_bytes       | 0                                            |
| wsrep_replicated             | 0                                            |
| wsrep_replicated_bytes       | 0                                            |
| wsrep_thread_count           | 33                                           |
+------------------------------+----------------------------------------------+
57 rows in set (0.09 sec)
```

https://github.com/codership/galera/issues/463

Comment 2 indicoliteplus 2017-05-09 07:47:10 UTC
https://bugzilla.redhat.com/show_bug.cgi?id=1335849

Comment 3 indicoliteplus 2017-05-09 07:47:31 UTC
https://github.com/codership/galera/issues/462

Comment 4 Honza Horak 2017-05-10 17:18:28 UTC
We plan to fix this issue via bz#1356897. If you can try the patch from https://bugzilla.redhat.com/attachment.cgi?id=1260826, we'd be happy for the feedback..

Comment 5 indicoliteplus 2017-05-11 02:28:46 UTC
https://bugzilla.redhat.com/attachment.cgi?id=1260826

when I click the above link, the page shows:
Sorry, you are not authorized to access attachment #1260826 [details].

Any other links to get the patch?
Then I'll test on my local env.

Thanks.

Comment 6 Honza Horak 2017-05-11 05:06:50 UTC
Sorry, that was a mistake. Please, try the same link again, I fixed the permissions.

Comment 7 indicoliteplus 2017-05-11 05:14:07 UTC
(In reply to Honza Horak from comment #6)
> Sorry, that was a mistake. Please, try the same link again, I fixed the
> permissions.

Thanks Honza!
It works! ;)

Comment 8 Honza Horak 2017-05-11 07:22:00 UTC
Great, thanks for the confirmation. I'm closing this one as duplicate, we can keep tracking this issue as part of the bz#1356897.

*** This bug has been marked as a duplicate of bug 1356897 ***