<br><font size=2 face="sans-serif">Hello Lars,</font>
<br><font size=2 face="sans-serif"> Andreas was whith us the last
week  ;-)</font>
<br>
<br><font size=2 face="sans-serif">So I think to that xfs_freeze is no
needed during a snapshot LVM2</font>
<br><font size=2 face="sans-serif">My backup Script do :</font>
<br><font size=2 face="sans-serif">FLUSH TABLES WITH READ LOCK;</font>
<br><font size=2 face="sans-serif">system lvcreate --snapshot -n $snapname
-L$snapsize /dev/$vg/$lv;</font>
<br><font size=2 face="sans-serif">UNLOCK TABLES;</font>
<br><font size=2 face="sans-serif">So i think it is the best way to backup</font>
<br>
<br><font size=2 face="sans-serif">The last message about peter Keller
worring me... You think to that XFS is not a filesystem that correspond
whit database transactions???</font>
<br><font size=2 face="sans-serif">I think XFS is actually the best FS
on all domains... can i use XFS for mysql database??<br>
</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">De :</font>
<td><font size=1 face="sans-serif">linux-lvm-request@redhat.com</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">A:</font>
<td><font size=1 face="sans-serif">linux-lvm@redhat.com</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Date:</font>
<td><font size=1 face="sans-serif">28/11/2008 16:40</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Objet :</font>
<td><font size=1 face="sans-serif">linux-lvm Digest, Vol 57, Issue 15</font>
<tr valign=top>
<td><font size=1 color=#5f5f5f face="sans-serif">Envoyé par :</font>
<td><font size=1 face="sans-serif">linux-lvm-bounces@redhat.com</font></table>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Send linux-lvm mailing list submissions to<br>
                
linux-lvm@redhat.com<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
                
</font></tt><a href="https://www.redhat.com/mailman/listinfo/linux-lvm"><tt><font size=2>https://www.redhat.com/mailman/listinfo/linux-lvm</font></tt></a><tt><font size=2><br>
or, via email, send a message with subject or body 'help' to<br>
                
linux-lvm-request@redhat.com<br>
<br>
You can reach the person managing the list at<br>
                
linux-lvm-owner@redhat.com<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of linux-lvm digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. XFS_freeze and LVM (Antony MARTINEAU)<br>
   2. Re: XFS_freeze and LVM (Falko Zurell)<br>
   3. Re: XFS_freeze and LVM (Peter Keller)<br>
   4. Re: XFS_freeze and LVM (Lars Ellenberg)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 27 Nov 2008 09:48:12 +0100<br>
From: Antony MARTINEAU <Antony.MARTINEAU@lippi.fr><br>
Subject: [linux-lvm] XFS_freeze and LVM<br>
To: linux-lvm@redhat.com<br>
Message-ID:<br>
                
<OFEEAC56CA.4D4B448B-ONC125750E.00300773-C125750E.00305B8E@lippi.fr><br>
Content-Type: text/plain; charset="us-ascii"<br>
<br>
Skipped content of type multipart/alternative-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: image/gif<br>
Size: 5552 bytes<br>
Desc: not available<br>
Url : </font></tt><a href="https://www.redhat.com/archives/linux-lvm/attachments/20081127/420339a5/attachment.gif"><tt><font size=2>https://www.redhat.com/archives/linux-lvm/attachments/20081127/420339a5/attachment.gif</font></tt></a><tt><font size=2><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Thu, 27 Nov 2008 09:54:14 +0100<br>
From: Falko Zurell <falko.zurell@idmedia.com><br>
Subject: Re: [linux-lvm] XFS_freeze and LVM<br>
To: "LVM general discussion and development" <linux-lvm@redhat.com><br>
Message-ID: <E3E8DACD-916F-4A20-AE40-535AE1373326@idmedia.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
<br>
are your LVM tools on the freezed file system? Is this the / partition
 <br>
you are freezing? Bad idea ;-)<br>
<br>
kind regards<br>
<br>
<br>
<br>
Am 27.11.2008 um 09:48 schrieb Antony MARTINEAU:<br>
<br>
><br>
> Hello,<br>
> I want using LVM 2 and Mysql<br>
> So i have mounted /var/lib/mysql on /dev/vg0/mysql.<br>
><br>
> For doing a backup i want do<br>
> xfs_freeze -f /var/lib/mysql<br>
> and after : lvcreate --snapshot -n snap -L1G /dev/vg0/mysql.<br>
><br>
> But the problem is when i freeze xfs filesystem i can't use lvm  <br>
> commands...<br>
> When i unfreeze xfs lvm commands are available...<br>
><br>
> Do you know the problem?? is it a bug.??<br>
> Cordialement,<br>
><br>
> <ATT54517403.gif><br>
> MARTINEAU<br>
> Antony<br>
> Service informatique<br>
> Assistant informatique<br>
> LIPPI Management            
    La Fouillouse<br>
> 16440 Mouthiers sur Boheme<br>
> Tel.: 05.45.67.34.35<br>
> Courriel: antony.martineau@lippi.fr<br>
> </font></tt><a href=http://www.lippi.fr/><tt><font size=2>http://www.lippi.fr</font></tt></a><tt><font size=2><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
><br>
> Ce message et toutes les pieces jointes sont etablis a l'attention
 <br>
> exclusive de ses destinataires et sont strictement confidentiels.
 <br>
> Pour en savoir plus cliquer ici<br>
><br>
> This message and any attachments are confidential to the ordinary
 <br>
> user of the e-mail address to which it was addressed and may also
be  <br>
> privileged. More information<br>
><br>
> _______________________________________________<br>
> linux-lvm mailing list<br>
> linux-lvm@redhat.com<br>
> </font></tt><a href="https://www.redhat.com/mailman/listinfo/linux-lvm"><tt><font size=2>https://www.redhat.com/mailman/listinfo/linux-lvm</font></tt></a><tt><font size=2><br>
> read the LVM HOW-TO at </font></tt><a href="http://tldp.org/HOWTO/LVM-HOWTO/"><tt><font size=2>http://tldp.org/HOWTO/LVM-HOWTO/</font></tt></a><tt><font size=2><br>
<br>
Falko Zurell ï£¿<br>
<br>
Head of Application Management<br>
<br>
<br>
/i-d media AG<br>
Ohlauer Straße 43<br>
D-10999 Berlin<br>
<br>
<br>
<br>
<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: </font></tt><a href="https://www.redhat.com/archives/linux-lvm/attachments/20081127/38bf5e9b/attachment.html"><tt><font size=2>https://www.redhat.com/archives/linux-lvm/attachments/20081127/38bf5e9b/attachment.html</font></tt></a><tt><font size=2><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Thu, 27 Nov 2008 10:28:05 +0000 (GMT)<br>
From: Peter Keller <pkeller@globalphasing.com><br>
Subject: Re: [linux-lvm] XFS_freeze and LVM<br>
To: LVM general discussion and development <linux-lvm@redhat.com><br>
Message-ID:<br>
                
<alpine.LNX.1.10.0811271006200.27683@bernoulli.globalphasing.com><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi,<br>
<br>
IIRC sometime around 2005 developments in LVM meant that using xfs_freeze
<br>
before creating a snapshot became the wrong thing to do. See the entry
in <br>
the changelog for revision 0.15 of the LVM how-to at <br>
</font></tt><a href="http://tldp.org/HOWTO/LVM-HOWTO/"><tt><font size=2>http://tldp.org/HOWTO/LVM-HOWTO/</font></tt></a><tt><font size=2>
. You will probably find that authoritative <br>
recommendations to use xfs_freeze relate to versions of LVM from before
this <br>
time. (Please correct me if I am wrong about this, someone.)<br>
<br>
Also bear in mind that filesystem transactions do not correspond to database
<br>
(i.e. MySQL) transactions. To get a reliable backup using a snapshot you
may <br>
need to allow uncommitted database transactions to complete or roll back
<br>
while preventing new ones from being started, then take the snapshot. Oracle
<br>
has a way of doing this that doesn't need the database to be completely
shut <br>
down, but I have no experience with MySQL so I can't be more specific.<br>
<br>
Good luck,<br>
Peter.<br>
<br>
On Thu, 27 Nov 2008, Falko Zurell wrote:<br>
<br>
> Date: Thu, 27 Nov 2008 09:54:14 +0100<br>
> From: Falko Zurell <falko.zurell@idmedia.com><br>
> Reply-To: LVM general discussion and development <linux-lvm@redhat.com><br>
> To: LVM general discussion and development <linux-lvm@redhat.com><br>
> Subject: Re: [linux-lvm] XFS_freeze and LVM<br>
> <br>
> Hi,<br>
> are your LVM tools on the freezed file system? Is this the / partition
you are<br>
> freezing? Bad idea ;-)<br>
> <br>
> kind regards<br>
> <br>
> <br>
> <br>
> Am 27.11.2008 um 09:48 schrieb Antony MARTINEAU:<br>
> <br>
><br>
>       Hello,<br>
>       I want using LVM 2 and Mysql<br>
>       So i have mounted /var/lib/mysql on /dev/vg0/mysql.<br>
><br>
>       For doing a backup i want do<br>
>       xfs_freeze -f /var/lib/mysql<br>
>       and after : lvcreate --snapshot -n snap -L1G
/dev/vg0/mysql.<br>
><br>
>       But the problem is when i freeze xfs filesystem
i can't use lvm commands...<br>
>       When i unfreeze xfs lvm commands are available...<br>
><br>
>       Do you know the problem?? is it a bug.??<br>
>       Cordialement,<br>
><br>
>                    
                  <ATT54517403.gif><br>
><br>
>       MARTINEAU<br>
>       Antony<br>
>       Service informatique<br>
>       Assistant informatique<br>
>       LIPPI Management La Fouillouse<br>
>       16440 Mouthiers sur Boheme<br>
>       Tel.: 05.45.67.34.35<br>
>       Courriel: antony.martineau@lippi.fr<br>
>       </font></tt><a href=http://www.lippi.fr/><tt><font size=2>http://www.lippi.fr</font></tt></a><tt><font size=2><br>
> <br>
> <br>
> <br>
> <br>
><br>
>       [eco.jpg]<br>
> <br>
><br>
>       Ce message et toutes les pieces jointes sont
etablis a l'attention<br>
>       exclusive de ses destinataires et sont strictement
confidentiels. Pour en<br>
>       savoir plus cliquer ici<br>
><br>
>       This message and any attachments are confidential
to the ordinary user of<br>
>       the e-mail address to which it was addressed
and may also be privileged.<br>
>       More information<br>
><br>
>       _______________________________________________<br>
>       linux-lvm mailing list<br>
>       linux-lvm@redhat.com<br>
>       </font></tt><a href="https://www.redhat.com/mailman/listinfo/linux-lvm"><tt><font size=2>https://www.redhat.com/mailman/listinfo/linux-lvm</font></tt></a><tt><font size=2><br>
>       read the LVM HOW-TO at </font></tt><a href="http://tldp.org/HOWTO/LVM-HOWTO/"><tt><font size=2>http://tldp.org/HOWTO/LVM-HOWTO/</font></tt></a><tt><font size=2><br>
> <br>
> <br>
> Falko Zurell <br>
> <br>
> Head of Application Management<br>
> <br>
> /i-d media AG<br>
> Ohlauer Straße 43<br>
> D-10999 Berlin<br>
> <br>
> <br>
> <br>
> <br>
><br>
<br>
--<br>
Peter Keller                  
                  Tel.: +44
(0)1223 353033<br>
Global Phasing Ltd.,                
            Fax.: +44 (0)1223 366889<br>
Sheraton House,<br>
Castle Park,<br>
Cambridge CB3 0AX<br>
United Kingdom<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 28 Nov 2008 16:39:40 +0100<br>
From: Lars Ellenberg <lars.ellenberg@linbit.com><br>
Subject: Re: [linux-lvm] XFS_freeze and LVM<br>
To: linux-lvm@redhat.com<br>
Message-ID: <20081128153940.GI18698@barkeeper1-xen.linbit><br>
Content-Type: text/plain; charset=iso-8859-1<br>
<br>
On Thu, Nov 27, 2008 at 10:28:05AM +0000, Peter Keller wrote:<br>
> Hi,<br>
><br>
> IIRC sometime around 2005 developments in LVM meant that using xfs_freeze
<br>
> before creating a snapshot became the wrong thing to do. See the entry
in <br>
> the changelog for revision 0.15 of the LVM how-to at  <br>
> </font></tt><a href="http://tldp.org/HOWTO/LVM-HOWTO/"><tt><font size=2>http://tldp.org/HOWTO/LVM-HOWTO/</font></tt></a><tt><font size=2>
. You will probably find that <br>
> authoritative recommendations to use xfs_freeze relate to versions
of LVM <br>
> from before this time. (Please correct me if I am wrong about this,
<br>
> someone.)<br>
><br>
> Also bear in mind that filesystem transactions do not correspond to
<br>
> database (i.e. MySQL) transactions. To get a reliable backup using
a <br>
> snapshot you may need to allow uncommitted database transactions to
<br>
> complete or roll back while preventing new ones from being started,
then <br>
> take the snapshot. Oracle has a way of doing this that doesn't need
the <br>
> database to be completely shut down, but I have no experience with
MySQL <br>
> so I can't be more specific.<br>
<br>
at some stage lvm/devicemapper started to do the freeze implicitly<br>
(on file systems that support freeze), and somewhen in between I think<br>
there was a deadlock on "double freeze" (some long time ago).<br>
maybe that is what you see.<br>
<br>
on "modern" systems, it should work either way, with or without
the<br>
explicit freeze (as long as you don't try to freeze your root fs,<br>
probably).<br>
<br>
for mysql and (innodb) transaction safety, yes,<br>
it is enough to use (writeable) snapshots.<br>
<br>
however, iirc, you better do a "FLUSH TABLES WITH READ LOCK"
(which may<br>
take a long time, as it waits for all pending statements to complete),<br>
then create the snapshot (which implicitly also freezes/unfreezes the<br>
fs), and "UNLOCK TABLES" again.<br>
<br>
-- <br>
: Lars Ellenberg<br>
: LINBIT | Your Way to High Availability<br>
: DRBD/HA support and consulting </font></tt><a href=http://www.linbit.com/><tt><font size=2>http://www.linbit.com</font></tt></a><tt><font size=2><br>
<br>
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
linux-lvm mailing list<br>
linux-lvm@redhat.com<br>
</font></tt><a href="https://www.redhat.com/mailman/listinfo/linux-lvm"><tt><font size=2>https://www.redhat.com/mailman/listinfo/linux-lvm</font></tt></a><tt><font size=2><br>
<br>
End of linux-lvm Digest, Vol 57, Issue 15<br>
*****************************************<br>
</font></tt>
<br>
<br><font size=2 face="sans-serif"><br>
<br>
<br>
</font>
<br><font size=2 face="Lucida Sans"><br>
</font><img src=http://www.lippi.fr/img/eco.jpg><font size=2 face="Lucida Sans"><br>
<br>
<br>
Ce message et toutes les pieces jointes sont etablis a l'attention exclusive
de ses destinataires et sont strictement confidentiels. </font><a href=http://www.lippi.fr/disclaimer.php><font size=2 color=blue face="Lucida Sans"><u>Pour
en savoir plus cliquer ici</u></font></a><font size=2 face="Lucida Sans"><br>
<br>
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.
</font><a href=http://www.lippi.fr/disclaimer.php><font size=2 color=blue face="Lucida Sans"><u>More
information</u></font></a><font size=2 face="Lucida Sans"><br>
</font>
<br>