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:I snapshot live mounted volumes every day. (LVM 1.x, kernel 2.4.21)
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.
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)
_______________________________________________ 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/