Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rutvij-pandya/a020b0aaa874d05d73fa74eeff0fe9f3 to your computer and use it in GitHub Desktop.
Save rutvij-pandya/a020b0aaa874d05d73fa74eeff0fe9f3 to your computer and use it in GitHub Desktop.
Create new Volume (i.e, 30gb) from Panel
>> Select volume, Go to Actions/Attach
>> Select instance to attach it
Mount volume to /mnt
>> Create EBS volume.
>> Attach EBS volume to /dev/sdf (EC2's external name for this particular device number).
>> Format file system /dev/xvdf (Ubuntu's internal name for this particular device number):
>> sudo mkfs.ext4 /dev/xvdf
>> Only format the file system if this is a new volume with no data on it. Formatting will make it difficult or impossible to retrieve any data that was on this volume previously.
>> Mount file system (with update to /etc/fstab so it stays mounted on reboot):
>> sudo mkdir -m 000 /vol echo "/dev/xvdf /vol auto noatime 0 0" | sudo tee -a /etc/fstab sudo mount /vol
Commands
>> df -h ## shows all volumes attached to server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment