Today I set up a new EC2 Instance from and AMI I created from an older EC2 instance. When I launched the new instance I took the AMI that was on a small instance and launched with a medium instance. From what I can tell this is pretty standard stuff. But here's the stang part.

According to AWS these are the differences

  • Small Instance (Default) 1.7 GB of memory, 1 EC2 Compute Unit (1 virtual core with 1 EC2 Compute Unit), 160 GB of local instance storage, 32-bit or 64-bit platform
  • Medium Instance 3.75 GB of memory, 2 EC2 Compute Units (1 virtual core with 2 EC2 Compute Units each), 410 GB of local instance storage, 32-bit or 64-bit platform

Okay now here's where I'm having an issue. I when I log into the new bigger instance it still reports only having 1.7 GB of ram.

The other strange part is that all my old partitions are still their in the same configurations. I see a new larger partition /mnt which is essential empty.

Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             7.9G  5.9G  1.6G  79% /
none                  846M  120K  846M   1% /dev
none                  879M     0  879M   0% /dev/shm
none                  879M   76K  878M   1% /var/run
none                  879M     0  879M   0% /var/lock
none                  879M     0  879M   0% /lib/init/rw
/dev/sda2             335G  195M  318G   1% /mnt
/dev/sdf               16G  9.9G  5.1G  67% /var2

This EC2 is a web server and I was serving files off the /var2 directory but for some reason the instance is storing everything on /

Okay here's what I'd like to do. Move all my website files to /mnt and have the web server point to that.

Any suggestions? If it helps here is what my fstab looks like as well.

root@myserver:/var# mount -l
/dev/sda1 on / type ext3 (rw) [cloudimg-rootfs]
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda2 on /mnt type ext3 (rw)
/dev/sdf on /var2 type ext4 (rw,noatime)

I hope this question makes sense. Basically i want my old files on this new partition.

Thanks in advance

  • What was the original AMI you started from? /mnt is the instance store. It goes away between instance launches. It's not the place to save data. You could cache it there for somewhat faster response. Are you mount a separate volume on /dev/sdf?
    – Skaperen
    Oct 29, 2012 at 0:51
  • The original AMI I started from was a small instance. It had 8gigs of disk space and we added another 16gigs afterward. So I shouldn't put any files on /mnt? Oct 29, 2012 at 0:55
  • I would like to verify my thinking by seeing the output of "cat /proc/partitions" (edit question to add it, showing the command line so others see what it is). Anything on instance store gets lost when the instance terminates. The new instance won't get it. I'd also like to see what volume(s) are attached to this instance.
    – Skaperen
    Oct 29, 2012 at 0:58
  • No problem: root@myserver:/mnt/www/vhosts# cat /proc/partitions major minor #blocks name 8 1 8388608 sda1 8 2 356485632 sda2 8 80 16777216 sdf 8 3 917504 sda3 Also I have two volumes attached to this instance vol-aafabbd7 8 GiB standard i-5d77e721 (server):/dev/sda1 (attached) vol-9dfabbe0 16 GiB standard i-5d77e721 (server):/dev/sdf (attached) Oct 29, 2012 at 0:59
  • That /mnt is instance storage. It's basically a physical hard drive on the physical node used to run the instance. Any contents put there will be lost when the instance terminates (and maybe lost when it stops ... I have not tested it to evaluate the vague documentation). It's useful for temporary space. How are you getting /dev/sdf attached?
    – Skaperen
    Oct 29, 2012 at 1:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.