Brian Candler
2012-Oct-13 14:52 UTC
[Gluster-users] Renaming a file in a distributed volume
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.
Stephan von Krawczynski
2012-Oct-13 15:05 UTC
[Gluster-users] Renaming a file in a distributed volume
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. -- Regards, Stephan
The file gets renamed on the distribute subvolume where it's stored and the subvolume where the new hash points gets a "sticky pointer" that points to where the file actually resides. On 10/13/2012 07:52 AM, Brian Candler 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. > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://supercolony.gluster.org/mailman/listinfo/gluster-users