Last active
August 29, 2015 14:01
-
-
Save fraank/3ddd7b3f9a34068ba8a4 to your computer and use it in GitHub Desktop.
Basics for using Elastic Block Store (EBS) in your EC2-Instances (OS: Ubuntu)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mounting an EBS-Storage | |
Variables: | |
@device_name = /dev/sdf | |
@device_mount = xvdf | |
@mount_point = /my_space | |
Select the EBS-Storage in the AWS-Console (Web-Interface) and attach it to the desired device. | |
Here you can set the @device_name which is shown in your instance as @device_mount. | |
show all informations of filesystem | |
$ lsblk | |
create mountpoint | |
$ sudo mkdir @mount_point | |
set file-system (ONLY FOR THE FIRST TIME - SO: NO DATA ON THE SYSTEM!!!) | |
$ sudo mkfs -t ext4 /dev/@device_mount | |
and finally mount it: | |
$ sudo mount /dev/@device_mount @mount_point | |
After you used that instance you need to detach it to keep files alive: | |
$ umount -d /dev/@device_mount | |
if it doesn't work, because it is busy you can use the lazy option (maybe file loss): | |
$ umount -l /dev/@device_mount | |
.. and go to the AWS-Console to detach that EBS. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment