[linux-lvm] RE: linux-lvm Digest, Vol 57, Issue 15

Antony MARTINEAU Antony.MARTINEAU at lippi.fr
Mon Dec 1 08:27:25 UTC 2008


Hello Lars,
 Andreas was whith us the last week  ;-)

So I think to that xfs_freeze is no needed during a snapshot LVM2
My backup Script do :
FLUSH TABLES WITH READ LOCK;
system lvcreate --snapshot -n $snapname -L$snapsize /dev/$vg/$lv;
UNLOCK TABLES;
So i think it is the best way to backup

The last message about peter Keller worring me... You think to that XFS is 
not a filesystem that correspond whit database transactions???
I think XFS is actually the best FS on all domains... can i use XFS for 
mysql database??




De :
linux-lvm-request at redhat.com
A:
linux-lvm at redhat.com
Date:
28/11/2008 16:40
Objet :
linux-lvm Digest, Vol 57, Issue 15
Envoyé par :
linux-lvm-bounces at redhat.com



Send linux-lvm mailing list submissions to
                 linux-lvm at redhat.com

To subscribe or unsubscribe via the World Wide Web, visit
                 https://www.redhat.com/mailman/listinfo/linux-lvm
or, via email, send a message with subject or body 'help' to
                 linux-lvm-request at redhat.com

You can reach the person managing the list at
                 linux-lvm-owner at redhat.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of linux-lvm digest..."


Today's Topics:

   1. XFS_freeze and LVM (Antony MARTINEAU)
   2. Re: XFS_freeze and LVM (Falko Zurell)
   3. Re: XFS_freeze and LVM (Peter Keller)
   4. Re: XFS_freeze and LVM (Lars Ellenberg)


----------------------------------------------------------------------

Message: 1
Date: Thu, 27 Nov 2008 09:48:12 +0100
From: Antony MARTINEAU <Antony.MARTINEAU at lippi.fr>
Subject: [linux-lvm] XFS_freeze and LVM
To: linux-lvm at redhat.com
Message-ID:
 <OFEEAC56CA.4D4B448B-ONC125750E.00300773-C125750E.00305B8E at lippi.fr>
Content-Type: text/plain; charset="us-ascii"

Skipped content of type multipart/alternative-------------- next part 
--------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 5552 bytes
Desc: not available
Url : 
https://www.redhat.com/archives/linux-lvm/attachments/20081127/420339a5/attachment.gif


------------------------------

Message: 2
Date: Thu, 27 Nov 2008 09:54:14 +0100
From: Falko Zurell <falko.zurell at idmedia.com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: "LVM general discussion and development" <linux-lvm at redhat.com>
Message-ID: <E3E8DACD-916F-4A20-AE40-535AE1373326 at idmedia.com>
Content-Type: text/plain; charset="utf-8"

Hi,

are your LVM tools on the freezed file system? Is this the / partition 
you are freezing? Bad idea ;-)

kind regards



Am 27.11.2008 um 09:48 schrieb Antony MARTINEAU:

>
> Hello,
> I want using LVM 2 and Mysql
> So i have mounted /var/lib/mysql on /dev/vg0/mysql.
>
> For doing a backup i want do
> xfs_freeze -f /var/lib/mysql
> and after : lvcreate --snapshot -n snap -L1G /dev/vg0/mysql.
>
> But the problem is when i freeze xfs filesystem i can't use lvm 
> commands...
> When i unfreeze xfs lvm commands are available...
>
> Do you know the problem?? is it a bug.??
> Cordialement,
>
> <ATT54517403.gif>
> MARTINEAU
> Antony
> Service informatique
> Assistant informatique
> LIPPI Management               La Fouillouse
> 16440 Mouthiers sur Boheme
> Tel.: 05.45.67.34.35
> Courriel: antony.martineau at lippi.fr
> http://www.lippi.fr
>
>
>
>
>
>
>
>
>
> Ce message et toutes les pieces jointes sont etablis a l'attention 
> exclusive de ses destinataires et sont strictement confidentiels. 
> Pour en savoir plus cliquer ici
>
> This message and any attachments are confidential to the ordinary 
> user of the e-mail address to which it was addressed and may also be 
> privileged. More information
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Falko Zurell 

Head of Application Management


/i-d media AG
Ohlauer Straße 43
D-10999 Berlin




-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
https://www.redhat.com/archives/linux-lvm/attachments/20081127/38bf5e9b/attachment.html


------------------------------

Message: 3
Date: Thu, 27 Nov 2008 10:28:05 +0000 (GMT)
From: Peter Keller <pkeller at globalphasing.com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: LVM general discussion and development <linux-lvm at redhat.com>
Message-ID:
 <alpine.LNX.1.10.0811271006200.27683 at bernoulli.globalphasing.com>
Content-Type: text/plain; charset="utf-8"

Hi,

IIRC sometime around 2005 developments in LVM meant that using xfs_freeze 
before creating a snapshot became the wrong thing to do. See the entry in 
the changelog for revision 0.15 of the LVM how-to at 
http://tldp.org/HOWTO/LVM-HOWTO/ . You will probably find that 
authoritative 
recommendations to use xfs_freeze relate to versions of LVM from before 
this 
time. (Please correct me if I am wrong about this, someone.)

Also bear in mind that filesystem transactions do not correspond to 
database 
(i.e. MySQL) transactions. To get a reliable backup using a snapshot you 
may 
need to allow uncommitted database transactions to complete or roll back 
while preventing new ones from being started, then take the snapshot. 
Oracle 
has a way of doing this that doesn't need the database to be completely 
shut 
down, but I have no experience with MySQL so I can't be more specific.

Good luck,
Peter.

On Thu, 27 Nov 2008, Falko Zurell wrote:

> Date: Thu, 27 Nov 2008 09:54:14 +0100
> From: Falko Zurell <falko.zurell at idmedia.com>
> Reply-To: LVM general discussion and development <linux-lvm at redhat.com>
> To: LVM general discussion and development <linux-lvm at redhat.com>
> Subject: Re: [linux-lvm] XFS_freeze and LVM
> 
> Hi,
> are your LVM tools on the freezed file system? Is this the / partition 
you are
> freezing? Bad idea ;-)
> 
> kind regards
> 
> 
> 
> Am 27.11.2008 um 09:48 schrieb Antony MARTINEAU:
> 
>
>       Hello,
>       I want using LVM 2 and Mysql
>       So i have mounted /var/lib/mysql on /dev/vg0/mysql.
>
>       For doing a backup i want do
>       xfs_freeze -f /var/lib/mysql
>       and after : lvcreate --snapshot -n snap -L1G /dev/vg0/mysql.
>
>       But the problem is when i freeze xfs filesystem i can't use lvm 
commands...
>       When i unfreeze xfs lvm commands are available...
>
>       Do you know the problem?? is it a bug.??
>       Cordialement,
>
>                                       <ATT54517403.gif>
>
>       MARTINEAU
>       Antony
>       Service informatique
>       Assistant informatique
>       LIPPI Management La Fouillouse
>       16440 Mouthiers sur Boheme
>       Tel.: 05.45.67.34.35
>       Courriel: antony.martineau at lippi.fr
>       http://www.lippi.fr
> 
> 
> 
> 
>
>       [eco.jpg]
> 
>
>       Ce message et toutes les pieces jointes sont etablis a l'attention
>       exclusive de ses destinataires et sont strictement confidentiels. 
Pour en
>       savoir plus cliquer ici
>
>       This message and any attachments are confidential to the ordinary 
user of
>       the e-mail address to which it was addressed and may also be 
privileged.
>       More information
>
>       _______________________________________________
>       linux-lvm mailing list
>       linux-lvm at redhat.com
>       https://www.redhat.com/mailman/listinfo/linux-lvm
>       read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
> 
> 
> Falko Zurell 
> 
> Head of Application Management
> 
> /i-d media AG
> Ohlauer Straße 43
> D-10999 Berlin
> 
> 
> 
> 
>

--
Peter Keller                                     Tel.: +44 (0)1223 353033
Global Phasing Ltd.,                             Fax.: +44 (0)1223 366889
Sheraton House,
Castle Park,
Cambridge CB3 0AX
United Kingdom

------------------------------

Message: 4
Date: Fri, 28 Nov 2008 16:39:40 +0100
From: Lars Ellenberg <lars.ellenberg at linbit.com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: linux-lvm at redhat.com
Message-ID: <20081128153940.GI18698 at barkeeper1-xen.linbit>
Content-Type: text/plain; charset=iso-8859-1

On Thu, Nov 27, 2008 at 10:28:05AM +0000, Peter Keller wrote:
> Hi,
>
> IIRC sometime around 2005 developments in LVM meant that using 
xfs_freeze 
> before creating a snapshot became the wrong thing to do. See the entry 
in 
> the changelog for revision 0.15 of the LVM how-to at 
> http://tldp.org/HOWTO/LVM-HOWTO/ . You will probably find that 
> authoritative recommendations to use xfs_freeze relate to versions of 
LVM 
> from before this time. (Please correct me if I am wrong about this, 
> someone.)
>
> Also bear in mind that filesystem transactions do not correspond to 
> database (i.e. MySQL) transactions. To get a reliable backup using a 
> snapshot you may need to allow uncommitted database transactions to 
> complete or roll back while preventing new ones from being started, then 

> take the snapshot. Oracle has a way of doing this that doesn't need the 
> database to be completely shut down, but I have no experience with MySQL 

> so I can't be more specific.

at some stage lvm/devicemapper started to do the freeze implicitly
(on file systems that support freeze), and somewhen in between I think
there was a deadlock on "double freeze" (some long time ago).
maybe that is what you see.

on "modern" systems, it should work either way, with or without the
explicit freeze (as long as you don't try to freeze your root fs,
probably).

for mysql and (innodb) transaction safety, yes,
it is enough to use (writeable) snapshots.

however, iirc, you better do a "FLUSH TABLES WITH READ LOCK" (which may
take a long time, as it waits for all pending statements to complete),
then create the snapshot (which implicitly also freezes/unfreezes the
fs), and "UNLOCK TABLES" again.

-- 
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.



------------------------------

_______________________________________________
linux-lvm mailing list
linux-lvm at redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm

End of linux-lvm Digest, Vol 57, Issue 15
*****************************************










Ce message et toutes les pieces jointes sont etablis a l'attention 
exclusive de ses destinataires et sont strictement confidentiels. Pour en 
savoir plus cliquer ici

This message and any attachments are confidential to the ordinary user of 
the e-mail address to which it was addressed and may also be privileged. 
More information


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20081201/fa5fe042/attachment.htm>


More information about the linux-lvm mailing list