Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In my research on file versioning at the fs level, snapshotting, and related ideas, I took a look at hard-links and exactly what they are and how they behave. Using rsync you can get a pretty slick poor man's snapshotting system up and running on file systems that don't natively support it.

But, can you get immutable hard links on ext3/4 or any other file systems for that matter?

My definition for immutable hard link is: A hard link which, when changed on one location, becomes a regular copy and no longer a hard link.

I would like this because it would enable snapshotting use of the source data to link against instead of a copy of the data (in the case of the rsync snapshotting technique).

I have gigabytes of data that can't be duplicated due to space restrictions but I have enough room if I can intelligently snapshot individual changed files with the rest linked to the source not a copy.

Given all that, is there some other technique, feature or technology I'm really looking for?

share|improve this question
add comment

3 Answers

There has been a proposal to add a new system call, reflink(), which would do exactly what you want. So far, it has not been accepted; however, ocfs2 (since 2.6.32) already has it as a ioctl ([1][2]).

A couple of articles from May 2009 on the subject:

An older variant of the idea was called COW Links.

share|improve this answer
    
Ah, that looks promising! –  Dale Forester Mar 30 '10 at 13:10
add comment

http://blog.interlinked.org/tutorials/rsync_time_machine.html http://rsnapshot.org/

both will work with ext3/ext4.

They aren't exactly snapshots, but, will create a new directory with hardlinks to the prior generation. Deleting the prior generation will leave the new directory with the correct files.

share|improve this answer
add comment

It seems to me that you are looking for WAFL-style snapshot. It does not exactly use "immutable hard link" semantic, but is very close to it.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.