Rudde / s3backer

Automatically exported from code.google.com/p/s3backer
GNU General Public License v2.0
0 stars 0 forks source link

Simple locking mechanism to prevent simultaneous mounts #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With the data loss hazard in issue 9, it might be wise to use a small file or 
meta information to 
indicate that the filesystem is mounted. A simple locking mechanism will 
protect against 
unintended unsafe mounts (e.g. laptop did not unmount cleanly due to network 
issues).

Original issue reported on code.google.com by jonsview on 14 Aug 2009 at 1:56

GoogleCodeExporter commented 9 years ago
This is a reasonable idea and would not be too hard to implement.

It's probably time to move the existing meta-data (filesystem block size, etc.) 
to a
new object (using the same bucket and prefix) named e.g. "_s3backer" that 
contains
all of the meta-data in an XML file, etc.

Original comment by archie.c...@gmail.com on 14 Aug 2009 at 3:06

GoogleCodeExporter commented 9 years ago

Original comment by archie.c...@gmail.com on 1 Oct 2009 at 8:01

GoogleCodeExporter commented 9 years ago

Original comment by archie.c...@gmail.com on 1 Oct 2009 at 8:01

GoogleCodeExporter commented 9 years ago
I think locking is a very important issue. I just managed to trash much of my 
reiserfs s3backer filesystem and have to fsck it (slow, costs money) re-upload 
10GB of data (slow, costs money) because something went wrong on my box and I 
ended up with two s3backer processes writing to the filesystem at the same 
time. It should be straightforward to write a file to the filesystem indicating 
that it is in use and not allow it to be remounted if that file is present 
(unless, perhaps, "forceMount" or something is specified).

Original comment by jikam...@gmail.com on 19 Oct 2010 at 4:42

GoogleCodeExporter commented 9 years ago
Fixed in r482.

Original comment by archie.c...@gmail.com on 11 May 2013 at 5:08