LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-04-2014, 01:49 PM   #1
NetEng1
Member
 
Registered: Aug 2011
Distribution: ubuntu
Posts: 40

Rep: Reputation: Disabled
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
 
Old 11-04-2014, 02:45 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,148

Rep: Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264Reputation: 1264
What do you get from this command on each server?

Code:
grep mysql /etc/passwd
 
Old 11-04-2014, 07:49 PM   #3
NetEng1
Member
 
Registered: Aug 2011
Distribution: ubuntu
Posts: 40

Original Poster
Rep: Reputation: Disabled
Thank your for your time. Here is the output on both servers.

Code:
Server1:

admin@server1:~$ grep mysql /etc/passwd
mysql:x:109:117:MySQL Server,,,:/nonexistent:/bin/false

Server2:

admin@server2:~$ grep mysql /etc/passwd
mysql:x:108:115:MySQL Server,,,:/nonexistent:/bin/false
 
Old 11-13-2014, 11:34 AM   #4
NetEng1
Member
 
Registered: Aug 2011
Distribution: ubuntu
Posts: 40

Original Poster
Rep: Reputation: Disabled
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.
 
  


Reply

Tags
drbd, mysql



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Second disk drive ownership issues Tworthy Linux - Newbie 2 07-24-2014 10:27 PM
Issues with DRBD/Pacemaker/CMAN/MySQL setup on RHEL 6.1 using ccs tool shalvie Linux - Newbie 7 04-23-2013 09:13 PM
servers freeze at service drbd start / modprobe drbd Gil@LQ Linux - Networking 0 03-22-2013 02:44 PM
RedHat Samba file ownership issues sharing with Windows users JayNic Linux - Newbie 3 12-04-2011 08:09 PM
File Ownership/Permissions Issues on NFS fileshare snowweb Linux - Server 9 08-15-2011 02:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration