bug-bash
[Top][All Lists]
Advanced

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

Re: How to overwrite a symbolic link?


From: Bob Proulx
Subject: Re: How to overwrite a symbolic link?
Date: Mon, 10 May 2010 09:07:23 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Peng Yu wrote:
> Marc Herbert wrote:
> > So you are really trying to re-invent some copy-on-write/versioning
> > file system by hacking symbolic links and redirections. This looks
> > like a lot of pain. You'd better start by looking at existing
> > solutions; even if none is ideal for your case, you would at least
> > leverage the existing knowledge and experience in this field instead
> > of starting from zero.
> 
> http://en.wikipedia.org/wiki/Versioning_file_system
> http://en.wikipedia.org/wiki/Ext3cow
> 
> I'm trying to understand how versioning and copy-on-write are relevant
> to my cases. But I don't think that they are really relevant to my
> cases.

Let me explain how I am reading it.  You are making a "copy" of some
files by creating symlinks in the new location that are pointing to
the old location.  Then when you write to the new location you are
trying to break the symlink and write a new file in the new location.
That process is exactly the process of a copy-on-write filesystem.  In
copy-on-write any write to the new location creates a new copy instead
of overwriting the old.  But it is done at the filesystem level.  All
writes of any type cause this to happy.

> The closest file system that I have used is snapshot (I don't know the
> exact technical term, but I remember there is a '.snapshot' directory
> in my home, where I can find previous 1 hour, 4 hours, 1 day and 1week
> versions of my home directory).

Your home directory is on NFS and very likely being served by an EMC
device.  It is making time based snapshots.  That isn't the same
thing.

> Please correct me if I'm wrong. These versioning file systems
> automatically keep different versions (modified at different time) of

No.  Copy-on-write filesystems automatically make a copy of your file
when you write to it.

Bob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]