DRBD ownership issues
I have a two node cluster configured using drbd 8.4.4, corosync 2.3.3, pacemaker 1.1.10 on Ubuntu 14.04 LTS servers. Using LVM, I created a block storage on each. Using LCMC 1.7.2.
DRBD is up and running between the servers and replicating between them: root@server1:/var/lib/mysql# cat /proc/drbd version: 8.4.3 (api:1/proto:86-101) srcversion: F97798065516C94BE0F27DC 0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r----- ns:376 nr:444 dw:892 dr:7953 al:7 bm:24 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0 resource config file is: root@server1:/var/lib/mysql# cat /etc/drbd.d/r0.res resource r0 { on server1 { volume 0 { device /dev/drbd0; disk /dev/AOS_VG1/lvol0; flexible-meta-disk internal; } address 10.0.6.61:7788; } on server2 { volume 0 { device /dev/drbd0; disk /dev/AOS_VG1/lvol0; flexible-meta-disk internal; } address 10.0.6.62:7788; } } pacemaker shows the status as all is well: Online: [ server1 server2 ] Master/Slave Set: ms_drbd_1 [res_drbd_1] Masters: [ server1 ] Slaves: [ server2 ] res_Filesystem_1 (ocf::heartbeat:Filesystem): Started server1 res_IPaddr2_1 (ocf::heartbeat:IPaddr2): Started server1 res_mysql_1 (ocf::heartbeat:mysql): Started server1 res_anything_AOS (ocf::heartbeat:anything): Started server1 The issue is that when I fail over from server1 to server2, the user and group ownerships are not mysql:mysql when mounted on server2. because of this, MySQL does not start until the ownership (chown) is changed to be correct. Here is what I see as the mounted directory at /var/lib/MySQL: drwxr-xr-x 13 109 117 4096 Nov 4 14:46 data/ It should be drwxr-xr-x 13 mysql mysql 4096 Nov 4 14:46 data/ There must be something obvious that I am missing in the configuration. Can someone point me in the right way? Thanks |
What do you get from this command on each server?
Code:
grep mysql /etc/passwd |
Thank your for your time. Here is the output on both servers.
Code:
Server1: |
Ok, thank you for pointing me in the correct direction. It did end up by being the UID and GID's were mismatched between the two servers causing the ownerships to change to the numeric value of the other node. I made them consistent and it is working now.
|
All times are GMT -5. The time now is 04:17 PM. |