** EBS disk는 추가적인 비용이 든다.
다음 내용은 disk의 용량을 늘릴 때 참고
How to mount an Amazon EBS disk as a drive in Linux (CentOS)
These instructions on how to mount an Amazon EBS volume apply to CentOS Linux specifically but with little modification can be applied to all Linux distributions. By attaching EBS volumes (aka. disks) to your instance you can get around the majority file space issues that might encounter when hosting popular websites or those which contain a lot of data (e.g. image galleries, music sites, podcasts, etc.)
- Note down the instance id of the instance you want to add more storage to
- In your AWS account go to the volumes link (under Elastic Block Store) click the Create Volume Button and choose how big you want this device to be.
- Attach the new EBS volume to your instance by right clicking it and choosing Attach Volume. Select the instance id from the list that you noted down in step 1. and give the new device a name to reference it on the instance, e.g. /dev/sdf(등록 시 표시는 이렇게 되어도 실제 콘솔에서는 xvdf로 뜸)
- Login into your instance on the command line and do and run (# represents the command prompt):
# ls /dev
You should see that /dev/sdf has been created for you - Format /dev/sdf by running:
# mkfs.ext3 /dev/sdf -> 테스트 할 땐 mkfs.ext4 /dev/xvdf 로 함
It will warn you that this an entire device. You should type y to allow the process to continue unless you want to create specific partitions on this device - Create a directory to mount your new drive as on the filesystem, for example we’ll use /files:
# mkdir /files - Add a reference in the fstab file to mount the newly formatted drive onto the /files directory by running the following command:
# echo “/dev/sdb /files ext3 noatime 0 0″ >> /etc/fstab -> 이것도 ext4로.. - Mount the drive by running:
# mount /files - Check your drive has mounted correctly with the expected amount of file space by running:
# df -h /files
It really is that simple, within a few cli commands you can simply add 1GB to 1TB of storage at the drop of a hat!
'Web Service > AWS' 카테고리의 다른 글
Sending Email from EC2 Instances (0) | 2012.07.27 |
---|---|
Ubuntu에 postfix 설정하기 (0) | 2012.07.19 |
[Mysql] 외부에서 mysql에 접근할 권한 주는 명령어 (0) | 2012.07.17 |
Texewrangler에서 aws에 있는 파일 바로 열기 (0) | 2012.07.09 |
Filezilla로 .pem 파일을 활용하여 로그인하기 (0) | 2012.06.12 |