1
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-add-volume-to-instance.htmlEC2에 EBS 볼륨 첨부
마지막 단계까지는 제대로 작동했습니다.
[email protected]:/home/ubuntu/crsq# cat /etc/fstab
LABEL=cloudimg-rootfs / ext4 defaults 0 0
/dev/xvdb /mnt auto defaults,nobootwait,comment=cloudconfig 0 2
/dev/xvda3 none swap sw,comment=cloudconfig 0 0
/dev/xvdf /mnt/dbmount ext4 defaults 0 2
원래 fstab 파일이 그대로 :
다음과 같이[email protected]:/home/ubuntu/crsq# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.9G 4.2G 3.4G 56%/
udev 819M 12K 819M 1% /dev
tmpfs 331M 184K 331M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 827M 0 827M 0% /run/shm
/dev/xvdf 99G 188M 94G 1% /mnt/dbmount
마지막 fstab 파일은 다음과 같습니다 나는 다음과 같이
[email protected]:/home/ubuntu/crsq# mount -a
mount: special device /dev/xvdb does not exist
내 파일 시스템은 다음과 같은 오류가
[email protected]:/home/ubuntu/crsq# cat /etc/fstab.orig
LABEL=cloudimg-rootfs / ext4 defaults 0 0
/dev/xvdb /mnt auto defaults,nobootwait,comment=cloudconfig 0 2
/dev/xvda3 none swap sw,comment=cloudconfig 0 0
aws 안내서에 "/ etc/fstab 파일의 오류로 인해 시스템이 부팅되지 않을 수 있습니다./etc/fstab 파일에 오류가있는 시스템을 종료하지 마십시오."라고 나와 있습니다. . 이게 바로 오류입니까? 나는 sudo mount -a로 마운트가 이루어 졌다고 생각하지 않는다. fstab 파일을 변경하기 전에 볼륨을 마운트했습니다. 이는 재부팅 할 때마다 인스턴스가 계속 첨부되어 있는지 확인하기위한 것입니다. –
맞지만 모든 오류가 부팅되지 않는 것은 아닙니다. 첫 줄에 주석을 달아보고'sudo mount -a'를 실행하여 오류가 없는지 확인하십시오. 그렇지 않으면 재부팅해도 안전합니다. – Rico
감사합니다. 도움이 된 –