dimanche 1 février 2015

Unable to mount an EBS volume as the root volume in Amazon EC2

I have an Amazon EC2 instance that seems to be messed up.


It has 2 disks - 8GB and 80GB. 8 GB seems to be the bootable disk but the entire filesystem/data is on the 80GB hard disk. If I try to boot the server with the 80 GB disk to /xvda, the server does not boot up. What I am looking for is to boot up the server with the 80 GB disk mounted in the root directory /. I am able to mount it in a folder but not in the root folder.


Output of lsblk



[root@ip-10-0-0-29 ec2-user]# 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 4G 0 disk
xvdf 202:80 0 80G 0 disk


[root@ip-10-0-0-29 ec2-user]# df -h



Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 7.8G 895M 6.8G 12% /
devtmpfs 1.9G 64K 1.9G 1% /dev
tmpfs 1.9G 0 1.9G 0% /dev/shm


I tried to use a Label and Labelled the 80GB disk as mainboot and added the following in the /etc/fstab file to mount the disk on startup, but that doesn't do anything. The 8GB disk is the one that gets mounted on startup to the root folder.


Contents of the /etc/fstab file



LABEL=mainboot / ext4 defaults,noatime 1 1
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0


I would like to know the easiest way to boot with the 80 GB disk. This used to work earlier as the entire linux filesystem is present in the disk, but I'm not sure why I am unable to boot using it.


Also unsure if its a AWS related issue or Linux related. The issue cropped up when I was trying to upgrade the AWS instance from medium to large.





Aucun commentaire:

Enregistrer un commentaire