Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to use Amazon S3 to store all of my files for my websites. I can set S3QL up properly so that it is mounted on /var/www and everything works fine.

I want to do it this way so that I can create an AMI, and then fire up multiple instances which would then also mount the same S3 bucket to /var/www

Will this cause any data corruption issues? Is this good practice?

EDIT: This would be for read+write

share|improve this question
    
You might need to read this - serverfault.com/questions/353808/… –  Daniel t. Feb 14 '13 at 21:55

1 Answer 1

up vote 1 down vote accepted

If: you mount the bucket read only, you're fine.

If: you try to mount it read/write, you're headed for trouble.

A method I've used is to create a large file, roughly the size of a disk that would hold the data and treat it like a partition. Essentially, it becomes a large file container. This saves a huge amount of time for things like copying small files, since you're not traversing actual individual files and directories over the network.

share|improve this answer
    
What? A filesystem on an image file in S3?? –  mgorven Feb 14 '13 at 21:53
    
Oh, S3QL chunks files. That's slightly less crazy then. –  mgorven Feb 14 '13 at 21:55
    
I wasn't speaking specifically about S3QL, just offering a general comment. Think of it like mounting an ISO remotely; instead of parsing through dozens of directories and initiating file transfers individually, it just reads the raw block data based on it's offset location. Works great with nfs. –  Stephan Feb 14 '13 at 21:57
    
For reading, okay, but writing will be horrible because S3 doesn't support random writes. –  mgorven Feb 14 '13 at 21:59
    
But why are you headed for trouble with read/write? –  Twitchy Feb 14 '13 at 22:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.