Format and Mount EBS in Ubuntu
Once you have a server up and running with an extra disk, you'll need a few extra steps to get that disk ready for use.
*Note: This is for the official Ubuntu 10.04 LTS AMI
- SSH into your instance
- mount
- take note of the /dev/sdX that is mounted i.e. /dev/sda1 on / type ext3 (rw)
- ls /dev
- take note of the /dev/sdX that is not the one from step 3
- fdisk /dev/sdX
- At "Command" type n
- at "Primary or Extended" type p
- At Number of volumes type 1
- Press "Return" two time to accept the defaults
- Press W to write the changes and exit
- type "mkfs.ext4 /dev/sdX" to format in Ext4
- type "mkdir /media/ebs"
- type "mount /dev/sdX /media/ebs" to mount the drive