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

Re: XFS "lockfs" Functionality



Someone else pointed out that LVM's snapshots take advantage of a VFS
lock patch and to this automagically.

I'd like to point out that EVMS also includes a patch of this nature,
and I have used EVMS and the xfs-VFS-lock patch successfully with XFS.  

It pauses the fs, flushes the XFS journal, syncs the disk, marks the fs
clean, takes the snapshot, unpauses the fs.  Works with other fs also.

The only trick is that you have to mount the snapshot with -o nouuid so
that XFS's isn't too smart for itsself. It normally won't allow mounting
of two fs with same UUID, to catch the case where someone clones a disk
and connects it to the same system (messes up xfsdump). 

Since it was snapshotted in the clean shutdown state, it can be mounted
read-only (although evms allows read-write shapshots too)

I laughed out loud the first time I tried it, it was so easy.  I
remember writing scripts to shut down all services, remount root
read-only, copy to another disk (took 30 mintes!), restart... 
-- 
Jeremy Jackson <jerj@coplanar.net>