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

[linux-lvm] RE: [PATCH] [CFT] - LVM snapshotting support for XFS



I'll be glad to give this a try.  I've been using the attached patches (in a
tgz) to use snapshots with xfs in the past.  Basically they are some short
LVM patches to allow writable snapshots.  Using this I was able to take a
snapshot and mount the snapshot read-write, allowing XFS to straighten
things out (without the benefit of an xfs_freeze-like command, it was like
turning the power off on the original of the system).  Then I would unmount
the snapshot, change it back to read-only, and remount it for normal
snapshot use.

I did have one other problem using XFS snapshots.  As long as the original
was mounted, I couldn't mount the snapshot as well because it had the same
uuid.  So before I could mount the snapshot read-write I had to change the
UUID using xfs_db (which also required writeable snapshots).  Actually, I
had to change it twice.  My usual sequence would be something like this:

# sync
# lvcreate --size 100 --chunksize 64  --snapshot --name snap0
/dev/volgr1/lvol0
# lvchange -p rw /dev/volgr1/snap0
# xfs_db -x -p xfs_admin -c 'uuid generate'
# xfs_db -x -p xfs_admin -c 'uuid generate'
# mount /dev/volgr1/snap0 /hd/vol_mnt1
# umount /dev/volgr1/snap0
# lvchange -p r /dev/volgr1/snap0
# mount /dev/volgr1/snap0 /hd/vol_mnt1

With a way to freeze the filesystem, I should be safer than just calling
sync and I don't think I'll need to do the read-write mount to replay.  Is
there a way around changing the UUID?

CCed to linux-lvm, since somebody over there may be interested in testing
XFS snapshots.

Dale Stephenson
steph connex com

> -----Original Message-----
> From: Steve Lord [mailto:lord sgi com]
> Sent: Monday, May 14, 2001 9:50 AM
> To: linux-xfs oss sgi com
> Subject: [PATCH] [CFT] - LVM snapshotting support for XFS
> 
> 
> 
> Here is some experimental code for XFS which should allow use 
> of the LVM
> snapshotting capability. There are two attachments to this message, a
> kernel patch which will apply to the current development tree 
> (2.4.4 base)
> and a tar file which adds a new command to the xfs commands. 
> You will also
> need to apply the VFS-lock.patch from the lvm sources to 
> enable snapshotting.
> 
> The new command added is xfs_freeze which can be used to stop 
> and flush
> an xfs filesystem and then restart it. If you apply the VFS-lock patch
> from the lvm sources then you will not need this.
> 
> I am looking for people to test this code, previous 
> experience with lvm 
> and its snapshotting facility would probably be a pre-requisit.
> 
> Steve
> 
> 
> 

Attachment: writesnap.tgz
Description: Binary data


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