[Ocfs2-users] OCFS2 and Snapshots

Andre Brinkmann brinkman at hni.upb.de
Fri Jul 21 08:20:27 CDT 2006


Joel Becker wrote:
> On Thu, Jul 20, 2006 at 07:54:57PM +0200, Andre Brinkmann wrote:
>   
>> Similar to OCFS2, XFS relies on the uniqueness of a serial number. But 
>> with XFS, I am able to change this uid with a user space admin tool. I 
>> hope to find (or implement) similar features in OCFS2 to be able to 
>> support snapshots. I think the possibility to change the uuid is import 
>> for most storage system. Even hardware RAIDs with integrated snapshots 
>> will have similar problems.
>>     
>
> 	I find it interesting that you use a modification of the uuid to
> handle snapshotting.  Certainly would work for a snapshot of
> OCFS2...however, it's also dangerous.  Two OCFS2 nodes absolutely rely
> on the uuid to ensure they are heartbeating for the same thing.  So we
> cannot safely change the uuid if there is any chance another node is
> running on the filesystem (let alone our own node :-).
> 	Now, your snapshot won't be mounted anywhere, sure, but our
> tools won't know a snapshot vs a live filesystem, and will need to make
> sure.  That just requires some locking.
> 	So, I think it is something we can look into as a feature for
> tunefs.ocfs2, but it isn't a one-liner and requires some correctness.
> 	Would you prefer to _set_ the uuid, or just generate a new one?
> I'd personally go with the latter (all it needs to do is differ from the
> non-snapshot volume), but I wanted to ask your opinion.
>
> Joel
>
>   
Hello Joel,

in my opinion, it is ok to let tunefs change the uuid of a volume. 
Normally this is done inside a script-chain and
the scripts should know what they are doing. Furthermore, it seems that 
the security mechanisms inside
tunefs ensure that changes to mounted devices are not possible, if the 
cluster is online.

I agree with you that it makes no sense to let the user guess a uuid and 
that tunefs should just generate a new
one. I have played around with your tools to get a better understanding 
of your tools and ocfs2 and I have created
a patch for the uuid. I have tried to program according to your coding 
style.

After applying the patches for the Makefile in tunefs.ocfs and for 
tunefs.c itself, you can generate a new uuid
by setting the -u or the --uuid-reset flag. The uuid is generated 
according to the method in mkfs.c .

After applying the patch, it has been possible to generate snapshots of 
ocfs2-volumes in a two node cluster
without any difficulties.

Best Regards

Andre


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-users/attachments/20060721/06a82731/attachment.html
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_Makefile
Url: http://oss.oracle.com/pipermail/ocfs2-users/attachments/20060721/06a82731/patch_Makefile.ksh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_tunefs.ocfs2.c
Url: http://oss.oracle.com/pipermail/ocfs2-users/attachments/20060721/06a82731/patch_tunefs.ocfs2.c


More information about the Ocfs2-users mailing list