Skip to content

Instantly share code, notes, and snippets.

@Emaasit
Created February 11, 2016 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Emaasit/f2ce81f648403136dac4 to your computer and use it in GitHub Desktop.
Save Emaasit/f2ce81f648403136dac4 to your computer and use it in GitHub Desktop.
Uploading Big Data to AWS
I had to do this today and thought of our discussion. I figured I'd document the commands and send them over - maybe it'll help.
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Commands:
$ sudo su
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 8G 0 disk
└─xvda1 202:1 0 8G 0 part /
xvdb 202:16 0 5G 0 disk
# file -s /dev/xvdb
/dev/xvdb: data
# mkfs -t ext4 /dev/xvdb
...
# mkdir /mnt/web
# mount /dev/xvdb /mnt/web
# df -h
...
/dev/xvdb 4.8G 10M 4.6G 1% /mnt/web
# echo '/dev/xvdb /mnt/web ext4 defaults,nofail 0 2' >> /etc/fstab
# reboot
Wait about a minute or so and try logging in... then type:
$ df -h
...
/dev/xvdb 4.8G 10M 4.6G 1% /mnt/web
if you see that last line ... it mounted and all is well.
Obviously you should change out 'web' for whatever you'd like your directory to be. I usually set up a symbolic link to the directory as part of my file structure. For instance:
$ cd /var; ln -s /mnt/web
creates a directory /var/web on my file structure. If needed, I can change that directory to a new mount point easily - your mileage may vary.
@Emaasit
Copy link
Author

Emaasit commented Feb 11, 2016

@yxes Thanks for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment