2 servers 1 common data base

2 servers 1 common data base

am 10.06.2010 07:09:25 von camelia botez

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

We have 2 mysql servers - one active , second standby.
The data base is on nsf storage file system mounted on the active server.
We want to turn on active the second server and to be able to use both
servers with the same nfs mounted data base.
Just now when I try to start mysqld on the second server I get an error
that says data base cannot be opened is locked by another mysql instance.
What can be done to run on both servers mysqld simultaneously and use
the same data base?
- --
Camelia Botez

Unix/Linux/HPC administrator

Weizmann Institute of Science

Tel: 972-89344964

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBTBBzhSE/LWeWdItOAQJFEAgAg5zq+ocqLnQxJT0PxSmvJ6bSMRA3 hESg
jAE5x5/55gbRQEMW5py3TD5PToBLROsdza4JlVyfQ/zo62ePaB2uX5zSNcPr N3hs
VVclktDFwejCkDdmKH4a/p9284K3UhPgNItmSFQKNsAZJhznoIs9ld5jZ8Mi QWjP
ZPjjalhII/IMQTODTGwzs00uW1wAXsQcATJlE/JdjwqKaBx6Xq64IQNgj4CN xeMS
2leZiINK/aAL9oi1Qssqx/AzfOm9Cz5+hSKkqxWW7DahoLtDw02zRwf8ERgz uRXS
2GaTXqbRicLzFYXvFJBruNKnMvNfap3Q3YhuzcLVWQ7aSUxeyBSEPg==
=SiGe
-----END PGP SIGNATURE-----

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: 2 servers 1 common data base

am 10.06.2010 08:40:22 von Benedikt Schackenberg

hello, you can not simultaneously fix two deamons to a data directory. a
mysql daemon always has exclusive access to the data directory.

Am 10.06.2010 07:09, schrieb camelia botez:
> and use
> the same data bas

--
S&P data GmbH
T 06131 218111
F 06131 218112
E schackenberg@termindoc.de
W www.termindoc.de

Unser Impressum finden Sie unter http://www.termindoc.de/Impressum.htm

Alle Willenserklärungen der S&P data GmbH bedürfen zu ihrer Wirksamkeit
der Schriftform versehen mit zwei Originalunterschriften.

Kommunikation über E-mail
Bei der Kommunikation über E-mail ist nicht in jedem Fall auszuschliessen,
dass Dritte unbefugt Kenntnis von den versandten Informationen nehmen.
Soweit Sie per E-mail mit uns Kontakt aufnehmen, nehmen wir an, dass Ihnen
diese Risiken bekannt und Sie dennoch damit einverstanden sind, dass wir
Ihnen per E-mail antworten. Anderenfalls bitten wir Sie, uns einen anderen
Kommunikationsweg zu benennen.

Für viele der Dateien, die Sie von uns erhalten, benötigen Sie zum
Betrachten den Acrobat Reader, den Sie hier erhalten können.
http://www.adobe.de/products/acrobat/readstep2.html
GF: Benedikt Schackenberg und Christian Peiter
AG & Sitz: Mainz am Rhein Handelsregister: HR-B
8608 Umsatzsteuer ID: DE126633578

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: 2 servers 1 common data base

am 10.06.2010 09:24:36 von Johan De Meersman

--00504502998928be030488a7ea30
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Yups. If you want to have two active servers, you'll need to set up
master-master replication and give each server it's own datastore. Note tha=
t
there's a load of caveats if you want to write to both servers, though -
read up on the documentation.


2010/6/10 Benedikt Schackenberg

> hello, you can not simultaneously fix two deamons to a data directory. a
> mysql daemon always has exclusive access to the data directory.
>
> Am 10.06.2010 07:09, schrieb camelia botez:
>
> and use
>> the same data bas
>>
>
> --
> S&P data GmbH
> T 06131 218111
> F 06131 218112
> E schackenberg@termindoc.de
> W www.termindoc.de
>
> Unser Impressum finden Sie unter http://www.termindoc.de/Impressum.htm
>
> Alle Willenserklärungen der S&P data GmbH bedürfen zu ihrer Wirksamke=
it
> der Schriftform versehen mit zwei Originalunterschriften.
>
> Kommunikation über E-mail
> Bei der Kommunikation über E-mail ist nicht in jedem Fall auszuschliess=
en,
> dass Dritte unbefugt Kenntnis von den versandten Informationen nehmen.
> Soweit Sie per E-mail mit uns Kontakt aufnehmen, nehmen wir an, dass Ihne=
n
> diese Risiken bekannt und Sie dennoch damit einverstanden sind, dass wir
> Ihnen per E-mail antworten. Anderenfalls bitten wir Sie, uns einen andere=
n
> Kommunikationsweg zu benennen.
>
> Für viele der Dateien, die Sie von uns erhalten, benötigen Sie zum
> Betrachten den Acrobat Reader, den Sie hier erhalten können.
> http://www.adobe.de/products/acrobat/readstep2.html
> GF: Benedikt Schackenberg und Christian Peiter
> AG & Sitz: Mainz am Rhein Handelsregister: HR-B
> 8608 Umsatzsteuer ID: DE126633578
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dvegivamp@tuxera.b=
e
>
>


--=20
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--00504502998928be030488a7ea30--

Re: 2 servers 1 common data base

am 10.06.2010 09:52:10 von Walter Heck

On Thu, Jun 10, 2010 at 07:09, camelia botez
wrote:
>What can be done to run on both servers mysqld simultaneously and use the same data base?

You are probably asking the wrong question here. Let's take a step
back and ask you another question: What is it you want to achieve on a
non-technical level? My gutfeeling tells me you want to have a
HA-setup, so that when your database server dies, another one will
take over.
If that is the case, there's a bunch of tools that can help you do
that. You could use classic replication up to a certain point, but
active-passive master-master is probably more like what you want to
achieve. For that, you can use a tool like MMM (http://mysql-mmm.org)
for instance, which will make your life much easier.

hope this helps!

===
Walter Heck
Engineer @ Open Query (http://openquery.com)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: 2 servers 1 common data base

am 10.06.2010 10:27:11 von Joerg Bruehe

Hi!


camelia botez wrote:
> We have 2 mysql servers - one active , second standby.
> The data base is on nsf storage file system mounted on the active s=
erver.
> We want to turn on active the second server and to be able to use b=
oth
> servers with the same nfs mounted data base.

NFS may be good for many purposes, but using it for database storage =
is
not among them.

Rather than write from scratch, I'll quote my own postings to this li=
st
of 2009-Aug-7 and 2009-Aug-10:

|> I would *never* use NFS storage for any DBMS (except for some test=
ing):
|> NFS access is slower than local disk access, and it adds more comp=
onents
|> to the critical path. So your operations get slower, reliability
|> decreases, and (in case of any trouble) analysis becomes more diff=
icult.
|>
|> I cannot imagine any setup where you have a machine strong enough =
to run
|> your DBMS on it, but not capable of driving sufficient local disks=
..
|>
|> The typical argument for having centralized disks serving many mac=
hines
|> is based on economies of scale (huge disks), flexibility (partitio=
ning),
|> and centralized management (RAID replacement, backup).
|> There may be some merit to this in a specialized setup (SAN system=
s -
|> I'm not convinced of them, but don't claim expert knowledge about =
them),
|> but IMO not using general-purpose machines and NFS.
|>
|> Whatever the economical advantages during normal operation may be,=
you
|> should not forget the huge costs you would incur if any in-between
|> component breaks and your database stops operating.
|> This may be tolerable for some applications, depending on the requ=
ired
|> availability, but simply intolerable for others.


|> ... my main objection against using NFS for database storage is no=
t
|> performance, it is complexity:
|> If your database server does not use local disks but NFS, then the
|> network between the database server and the NFS server as well as =
that
|> server suddenly become essential components for your database setu=
p.
|> As any component may fail, you increase the risk to your DB.
|>
|> You may reduce the individual risk by selecting better hardware, d=
ual
|> controllers, dual cabling, mirrored machines, ... as much as you l=
ike,
|> the result will still be higher complexity and higher risks than i=
f you
|> had applied similar enhancements to your database server and its l=
ocal
|> disks.


Regarding to your technical question:

> Just now when I try to start mysqld on the second server I get an e=
rror
> that says data base cannot be opened is locked by another mysql ins=
tance.
> What can be done to run on both servers mysqld simultaneously and =
use
> the same data base?

One of the technical limitations of many NFS implementations is locki=
ng:
The concept of NFS is to be a stateless system (on the NFS server), a=
nd
that is not compatible with supporting file locks.

So it may be that NFS denies a lock request from the remote machine, =
or
you may have a NFS implementation that supports locking, and the requ=
est
is denied because the local instance already holds a lock.

Running two MySQL servers simultaneously on the same data files is ev=
en
worse than trying NFS: An instance of the MySQL server assumes it is =
the
only entity that accesses the data files, and manipulating overlappin=
g
data from two instances is a sure way to damage the data structures.
So rather than trying to overcome that hurdle, you should be glad it =
is
protecting you.


Jörg

--=20
Joerg Bruehe, MySQL Build Team, Joerg.Bruehe@Sun.COM
Sun Microsystems GmbH, Komturstrasse 18a, D-12099 Berlin
Geschaeftsfuehrer: Juergen Kunz
Amtsgericht Muenchen: HRB161028


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql-2@m.gmane.o rg

Re: 2 servers 1 common data base

am 10.06.2010 10:49:54 von Johan De Meersman

--0016e646a24034caeb0488a91b2e
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Jun 10, 2010 at 10:27 AM, Joerg Bruehe wrote:

> |> There may be some merit to this in a specialized setup (SAN systems -
> |> I'm not convinced of them, but don't claim expert knowledge about them),
>

As a slight aside, I'd like to offer you two major advantages of SAN
systems:

1. More spindles, thus lower latency
2. Thin provisioning - akin to sparse files, you only lock the space you
really use, not what you reserve.

Both are of course at their most useful in large environments.

--
Bier met grenadyn
Is als mosterd by den wyn
Sy die't drinkt, is eene kwezel
Hy die't drinkt, is ras een ezel

--0016e646a24034caeb0488a91b2e--