Useful Commands when Fixing EBS in EC2
When there is problem with your EBS Volume, you can try detach the root device, attaching it to another device and access it to fix it.
To attach: mount /dev/xvdf /vol
To detach: umount /vol
where /vol
is the mount point
When you want to re-attach a root device, you have to set the device name to/sda1
instead of the default name /sdf
If error when trying to mount EBS:1
2
3
4mount: wrong fs type, bad option, bad superblock on /dev/xvdf,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
try:sudo mount /dev/xvdf /vol -t ext4
or sudo mount /dev/xvdf1 /vol -t ext4
Filesystem check: fsck
If any settings wrong, it’s in /etc/fstab