[Gluster-users] Renaming a file in a distributed volume
roccas at gmail.com
Sat Oct 13 17:26:56 UTC 2012
On Sat, Oct 13, 2012 at 1:53 PM, Brian Candler <B.Candler at pobox.com> wrote:
> On Sat, Oct 13, 2012 at 05:05:08PM +0200, Stephan von Krawczynski wrote:
> > On Sat, 13 Oct 2012 15:52:56 +0100
> > Brian Candler <B.Candler at pobox.com> wrote:
> > > In a distributed volume (glusterfs 3.3), files within a directory are
> > > assigned to a brick by a hash of their filename, correct?
> > >
> > > So what happens if you do "mv foo bar"? Does the file get copied to another
> > > brick? Is this no longer an atomic operation?
> > >
> > > Thanks,
> > >
> > > Brian.
> > In fact it has never been atomic.
> > Take a look at my corresponding bug report from "back then"...
> > You can use a small script to show it is not.
> I hunted around, I couldn't find much in bugzilla apart from
> (seems to be more about replicated volumes). I couldn't find any bugs
> containing "skraw", but I'm probably just driving bugzilla wrongly.
> I did find this recent posting though:
> Is this what you're talking about? This is about an old version of glusterfs
> but the version used is not specified as far as I can see.
> Anyway, I think my question is answered. Normally I would create a file as
> xxx.tmp, sync and then rename it to xxx, to protect against a
> partially-created file; but for large files this looks like it's not a good
> approach for glusterfs with a distributed volume.
So are some tools like winscp or rsync which use temporary names mostly...
"¿No será acaso que esta vida moderna está teniendo más de moderna que
de vida?" (Mafalda)
More information about the Gluster-users