Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My client has me working on a project that I'm a little lost on in terms of any kind of sure-fire answer.

He uses Amazon EC2 to host his servers -- namely, he utilizes spot requests. If you've used EC2 spot requests before, you're aware that upon termination of an instance, its data is lost.

To solve this, he wants to attach and mount an external EBS volume. He provided a list of the directories that he wants to be persistent. He insists that I find a way to do this, but I'm nearly certain it is impossible.

I was able to move a few of the root directories with no ill side effects (I moved them to the mounted EBS and created symbolic links pointing to the proper locations). /home is easy to move, as was /var, /usr, and a couple more. He insists, however, that /bin, /sbin, /lib, /lib64, and /etc must reside on the EBS volume.

It seems obvious to me that this won't work, as the EBS volume must be mounted at some point. The earliest point I'm able to mount it, as far as I know, is via /etc/fstab. If you store /etc on the external drive, then how are you going to mount it? If you can't mount it, how are you going to access /etc/fstab.... it's a paradox.

So, am I correct in my assumptions? Whether I am or I am not, please help me out by providing enough information to explain the situation to him. My intuition immediately screams "NO" to this idea, but I honestly don't have a single, big-picture, solid argument to back myself up.

Thanks!

Additional Information:

He is saying he would like for me to find a way to keep all core, necessary files on the root drive, whilst simultaneously storing anything else on the EBS volume.

Please tell me I'm not crazy and that this is just completely insane.

share|improve this question

1 Answer 1

Yes, this is a little crazy and at the least unnecessary. It sounds like the client doesn't understand how AMIs work. The /bin, /sbin etc. directories won't be "lost" if they are baked into the AMI you launch with.

The right way to do it would be:

  • Build an AMI with the basic configuration that you need to run the app.
  • Add a script that attaches an EBS volume which has all the volatile data after bootup. If, for example, you need to have the /var partition persistent (for logs) you can make this soft link to the EBS volume.
  • Designate this AMI as the one to be launched for spot requests.

Your app will, of course, have to be able to handle the fact that it can be terminated without notice at any time so it will need to have some kind of transaction checkpoints so it knows what was successfully written to the persistent EBS partition.

share|improve this answer

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.