All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-lvm] mounting snapshot errors
@ 2004-01-27 19:02 R Dicaire
  0 siblings, 0 replies; 5+ messages in thread
From: R Dicaire @ 2004-01-27 19:02 UTC (permalink / raw)
  To: lvm

I apologize for the repeat but never got a response.

I posted a few days ago regarding the inability to mount snapshots
if the volume's file system is ext3/xfs/reiserfs. Using current lvm
1.0.8 on linux kernel 2.4.23-xfs with lvm 1.0.8 patch and 1.0.8 lvm
tools.

Is there a fix for this issue?

-- 
      aRDy Music
http://www.ardynet.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-lvm] mounting snapshot errors
@ 2004-01-27 21:54 Little, Chris
  2004-01-28  2:30 ` R Dicaire
  0 siblings, 1 reply; 5+ messages in thread
From: Little, Chris @ 2004-01-27 21:54 UTC (permalink / raw)
  To: 'linux-lvm@sistina.com'

is the filesystem you are snapshotting still mounted when you execute the
snapshot?  They need to be offline before the snapshot takes place.

-----Original Message-----
From: R Dicaire [mailto:rdicaire@kritek.net]
Sent: Tuesday, January 27, 2004 6:01 PM
To: lvm
Subject: [linux-lvm] mounting snapshot errors


I apologize for the repeat but never got a response.

I posted a few days ago regarding the inability to mount snapshots
if the volume's file system is ext3/xfs/reiserfs. Using current lvm
1.0.8 on linux kernel 2.4.23-xfs with lvm 1.0.8 patch and 1.0.8 lvm
tools.

Is there a fix for this issue?

-- 
      aRDy Music
http://www.ardynet.com


_______________________________________________
linux-lvm mailing list
linux-lvm@sistina.com
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-lvm] mounting snapshot errors
  2004-01-27 21:54 Little, Chris
@ 2004-01-28  2:30 ` R Dicaire
  2004-01-28 12:48   ` Greg Freemyer
  0 siblings, 1 reply; 5+ messages in thread
From: R Dicaire @ 2004-01-28  2:30 UTC (permalink / raw)
  To: lvm

On Tue, 2004-01-27 at 21:53, Little, Chris wrote:
> is the filesystem you are snapshotting still mounted when you execute the
> snapshot?  They need to be offline before the snapshot takes place.

Yes, they are still mounted when I take a snapshot, I must have missed that
in the docs, that in itself poses a problem as I then cant umount the volumes
without killing services. I'd understood the snapshotting process as being
able to snapshot a live filesystem, and then mount the snapshot to perform
backups from it instead of the live filesystem. Whats the purpose of the
--size arg to lvcreate when taking a snapshot, I thought it was a buffer
to hold data that'd normally be written to disk but cant when the
snapshot exists? I'm confused.

> -- 
>       aRDy Music
> http://www.ardynet.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [linux-lvm] mounting snapshot errors
  2004-01-28  2:30 ` R Dicaire
@ 2004-01-28 12:48   ` Greg Freemyer
  2004-01-28 13:23     ` Chris Beck
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Freemyer @ 2004-01-28 12:48 UTC (permalink / raw)
  To: lvm

On Wed, 2004-01-28 at 02:28, R Dicaire wrote:
> On Tue, 2004-01-27 at 21:53, Little, Chris wrote:
> > is the filesystem you are snapshotting still mounted when you execute the
> > snapshot?  They need to be offline before the snapshot takes place.
> 
> Yes, they are still mounted when I take a snapshot, I must have missed that
> in the docs, that in itself poses a problem as I then cant umount the volumes
> without killing services. I'd understood the snapshotting process as being
> able to snapshot a live filesystem, and then mount the snapshot to perform
> backups from it instead of the live filesystem. Whats the purpose of the
> --size arg to lvcreate when taking a snapshot, I thought it was a buffer
> to hold data that'd normally be written to disk but cant when the
> snapshot exists? I'm confused.
> 
I snapshot live mounted volumes every day.  (LVM 1.x, kernel 2.4.21)

It works.

I use xfs.

For LVM snapshot to work with mounted filesystems you either have to
have the vfs-lock patch applied or invoke a filesystem freeze from user
space prior to creating the snapshot.

With xfs, I use the xfs_freeze command from userspace.

Then on the xfs mount, I have to use the "-o ro,nouuid" flag to mount
the snapshot because the master volume and the  snapshot have the same
uuid.

Greg
-- 
Greg Freemyer

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [linux-lvm] mounting snapshot errors
  2004-01-28 12:48   ` Greg Freemyer
@ 2004-01-28 13:23     ` Chris Beck
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Beck @ 2004-01-28 13:23 UTC (permalink / raw)
  To: linux-lvm

Yah, I saw some stuff about this in the LVM-HOWTO:

http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html

| If the snapshot is of an XFS filesystem, the xfs_freeze command should 
be used to quiesce the filesystem before creating the snapshot. (if the 
filesystem is mounted) |

|# xfs_freeze -f /mnt/point; lvcreate -L592M -s -n dbbackup /dev/ops/databases; xfs_freeze -u /mnt/point 

If you are using XFS as the filesystem you will need to add the nouuid option to the mount command:

# mount /dev/ops/dbbackup /mnt/ops/dbbackup -onouuid,ro
               
Previously, the norecovery option was suggested to allow the mounting of XFS snapshots.
It has been recommended not to use this option, but to instead use xfs_freeze to quiesce the filesystem before creating the snapshot.

|

cheers,
chris


It is whispered that Greg Freemyer was heard, on or about 1/28/2004 
12:34 PM to say:

>On Wed, 2004-01-28 at 02:28, R Dicaire wrote:
>  
>
>>On Tue, 2004-01-27 at 21:53, Little, Chris wrote:
>>    
>>
>>>is the filesystem you are snapshotting still mounted when you execute the
>>>snapshot?  They need to be offline before the snapshot takes place.
>>>      
>>>
>>Yes, they are still mounted when I take a snapshot, I must have missed that
>>in the docs, that in itself poses a problem as I then cant umount the volumes
>>without killing services. I'd understood the snapshotting process as being
>>able to snapshot a live filesystem, and then mount the snapshot to perform
>>backups from it instead of the live filesystem. Whats the purpose of the
>>--size arg to lvcreate when taking a snapshot, I thought it was a buffer
>>to hold data that'd normally be written to disk but cant when the
>>snapshot exists? I'm confused.
>>
>>    
>>
>I snapshot live mounted volumes every day.  (LVM 1.x, kernel 2.4.21)
>
>It works.
>
>I use xfs.
>
>For LVM snapshot to work with mounted filesystems you either have to
>have the vfs-lock patch applied or invoke a filesystem freeze from user
>space prior to creating the snapshot.
>
>With xfs, I use the xfs_freeze command from userspace.
>
>Then on the xfs mount, I have to use the "-o ro,nouuid" flag to mount
>the snapshot because the master volume and the  snapshot have the same
>uuid.
>
>Greg
>  
>

-- 
Chris Beck / Y.A.B.A. / Fungal Genomics
CFSG / Concordia University
"La loi dans sa majestueuse égalité, interdit à tous, aux riches comme
aux pauvres de dormir sous les ponts, de coucher dans la rue et de voler
du pain." -- Anatole France (Les Lys Rouge - 1894)

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-01-28 13:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-27 19:02 [linux-lvm] mounting snapshot errors R Dicaire
  -- strict thread matches above, loose matches on Subject: below --
2004-01-27 21:54 Little, Chris
2004-01-28  2:30 ` R Dicaire
2004-01-28 12:48   ` Greg Freemyer
2004-01-28 13:23     ` Chris Beck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.