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

Re: Distinct transactions

Our configuration file has grown to a collection of files that we want to
atomically switch to.  I have tried to hard link (as root) a directory under
ext2 to another directory, and I get a permission error.  According to 'man
link' this means that the file system does not allow hard linked directories.
Is this true of ext2 and ext3?

To be more clear on our plans, we have a set of files that exist in
<...>/pkg/version.  When a new version is released, we want to create

Once new is in place, we want to link this directory to pkg/current (replacing
a hard link between /pkg/version and pkg/new).

Since this is atomic in ext3, it looked like a good idea.  But now, we are
stuck on EPERM.  Did I do something else wrong or is this pan flawed to start?



Nigel Metheringham wrote:

> On 14 Jun 2001 18:17:34 -0600, Andreas Dilger wrote:
> > If you are doing journalling, I would propose the following:
> > 1) copy config to new file
> > 2) modify new file
> > 3) copy original config to backup
> > 4) mv modified file to replace original
> >
> > The reason for doing this is that at no time will you NOT have a valid
> > config file in place.  One mv is guaranteed atomic, whereas two are not.
> To pick a minor nit, you can do this
> a little more efficiently by making
> step #3 a (hard) link of original
> config to backup.
>         Nigel.
> --
> [ Nigel Metheringham           Nigel Metheringham InTechnology co uk ]
> [ Phone: +44 1423 850000                         Fax +44 1423 858866 ]
> [ - Comments in this message are my own and not ITO opinion/policy - ]
> [ ----- Security is not an add-on -- security is a way of life ----- ]
> _______________________________________________
> Ext3-users mailing list
> Ext3-users redhat com
> https://listman.redhat.com/mailman/listinfo/ext3-users

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