Eric Eijkelenboom <[email protected]> writes:
> Hi guys
>
> Here’s what happened:
>
> 1. Due to a server shutdown, the filesystem was not cleanly umount’ed.
> Hereafter, fsck resulted in ‘fs still mounted elsewhere, aborting’
> errors (obviously, the backend was not mounted anywhere else).
Did you run with --batch? Normally, fsck will prompt you and you can
tell it to continue running anyway. No need to mess with the metadata at
all.
> 2. I tried restoring from backup by renaming
> s3://mybucket/s3ql_metadata_bak_0 to to s3://mybucket/s3ql_metadata,
> hereby overwriting s3ql_metadata (yes, big screw-up).
Yep. That breaks things, because it looks as if some malicious other guy
is trying to get you to use outdated metadata.
> After discovering s3qladm download-metadata, I tried to:
>
> 1. s3qladm download-metadata s3://mybucket
> 2. Choose a backup
> 3. Move the generated files to ~/.s3ql
> 4. Run fsck.
>
> fsck does it’s thing, but crashes in the end with the same exception
> as above:
>
> ...
> Backing up old metadata...
> Uncaught top-level exception:
> Traceback (most recent call last):
> File "/usr/bin/fsck.s3ql", line 9, in <module>
> load_entry_point('s3ql==2.12', 'console_scripts', 'fsck.s3ql')()
> File "/usr/lib/s3ql/s3ql/fsck.py", line 1291, in main
> cycle_metadata(backend)
> File "/usr/lib/s3ql/s3ql/metadata.py", line 127, in cycle_metadata
> backend.copy("s3ql_metadata", "s3ql_metadata_bak_0")
> File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 290, in copy
> self._copy_or_rename(src, dest, rename=False, metadata=metadata)
> File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 302, in _
> copy_or_rename
> (nonce, meta_old) = self._verify_meta(src, meta_raw)
> File "/usr/lib/s3ql/s3ql/backends/comprenc.py", line 139, in _
> verify_meta
> % (stored_key, key))
> s3ql.backends.common.CorruptedObjectError: Object content does not
> match its key (s3ql_metadata_new vs s3ql_metadata)
>
> Questions:
> 1. What can I do from here?
Delete the "s3ql_metadata" object from the bucket (or rename it to
something that does not start with s3ql_).
> 2. How to avoid this in the future?
* Never, ever, modify the bucket contents with anything but the S3QL
tools.
* Don't use s3qladm download-metadata before you've asked on this list,
fsck.s3ql should be able to handle 99% of all problems.
* Don't shut down the server while the file system is still mounted :-)
Best,
-Nikolaus
--
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F
»Time flies like an arrow, fruit flies like a Banana.«
--
You received this message because you are subscribed to the Google Groups
"s3ql" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.