[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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




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 redhat com
A: linux-lvm redhat com
Date: 28/11/2008 16:40
Objet : linux-lvm Digest, Vol 57, Issue 15
Envoyé par : linux-lvm-bounces redhat com





Send linux-lvm mailing list submissions to
                linux-lvm 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 redhat com

You can reach the person managing the list at
                linux-lvm-owner 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 lippi fr>
Subject: [linux-lvm] XFS_freeze and LVM
To: linux-lvm redhat com
Message-ID:
                <OFEEAC56CA 4D4B448B-ONC125750E 00300773-C125750E 00305B8E 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 idmedia com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: "LVM general discussion and development" <linux-lvm redhat com>
Message-ID: <E3E8DACD-916F-4A20-AE40-535AE1373326 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 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 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 globalphasing com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: LVM general discussion and development <linux-lvm redhat com>
Message-ID:
                <alpine LNX 1 10 0811271006200 27683 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 idmedia com>
> Reply-To: LVM general discussion and development <linux-lvm redhat com>
> To: LVM general discussion and development <linux-lvm 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 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 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 linbit com>
Subject: Re: [linux-lvm] XFS_freeze and LVM
To: linux-lvm redhat com
Message-ID: <20081128153940 GI18698 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 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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]