in Education by
I'm having a problem connecting EBS volume to my Ubuntu EC2 Instance. Here's what I did: 1. From the Amazon AWS Console, I created an EBS 150GB volume and attached it to an Ubuntu "version" EC2 instance. Under the EBS volume properties, "Attachment" shows: "[my Ubuntu instance id]:/dev/sdf (attached)" 2. Tried mounting the drive on the Ubuntu box, and it told me "mount: /dev/sdf is not a block device sudo mount /dev/sdf /vol 3. So I checked with fdisk and tried to mount from the new location and it told me it wasn't the right file system. sudo fdisk -l sudo mount -v -t ext4 /dev/xvdf /vol the error: mount: 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 "dmesg | tail" told me it gave the following error: EXT4-fs (sda1): VFS: Can't find ext4 filesystem Questions: Q1: Based on point 1 (above), why was the volume mapped to 'dev/sdf' when it's really mapped to '/dev/xvdf'? Q2: What else do I need to do to get the EBS volume loaded? I thought it'll just take care of everything for me when I attach it to an instance. Select the correct answer from above options

1 Answer

0 votes
by
 
Best answer
Since this is a new volume, first let us format the EBS volume. So this is the process: 1. First, create an EBS volume 2. Attach EBS volume to /dev/sdf (particular device number is EC2’s external name). 3. Format file system /dev/xvdf (particular device number is Ubuntu’s internal name): sudo mkfs.ext4 /dev/xvdf Note Format only if this is a new volume with no data. It might become difficult or impossible to retrieve data once it is done. 4. Mount file system (with an update to /etc/fstab so it stays mounted on reboot): sudo mkdir -m 000 /vol echo "/dev/xvdf /vol auto noatime 0 0" | sudo tee -a /etc/fstab sudo mount /vol

Related questions

0 votes
    I was given AWS Console access to an account with 2 instances running that I cannot shut down (in production). ... into the instances? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I'm unclear as to what benefits I get from EBS vs. instance-store for my instances on Amazon EC2. If ... is still relatively new? Select the correct answer from above options...
asked Jan 30, 2022 in Education by JackTerrance
0 votes
    I'm currently running an ec2 micro instance and i've been finding that the instance occasionally runs out of memory. ... can be done? Select the correct answer from above options...
asked Feb 1, 2022 in Education by JackTerrance
0 votes
    How can I delete instance in Amazon EC2. I have terminated the instance but still it was showing in ... instance gets terminated Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    We have a large ec2 instance running in Asia pacific region. We want to reserve that particular instance.In aws ... out on something Select the correct answer from above options...
asked Feb 8, 2022 in Education by JackTerrance
0 votes
    When I reboot an EC2 instance, do I get the initial image again, or is the state of the hard disk before the ... in when I rebooted? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I need SSH access to an Amazon EC2 instance running Ubuntu. All I have is the Amazon username and password. Any ideas? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I understand nearly nothing to the functioning of EC2. I created an Amazon Web Service (AWS) account. Then I ... user's guide. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    Sometimes when trying to launch my t1.micro EC2 instance, it cannot be provisioned and Amazon recommends trying ... existing instance? Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    I cannot SSH into my instance - Operation timed out. What could be the reasons why, and what can I do to ... because of memory issues. Select the correct answer from above options...
asked Feb 4, 2022 in Education by JackTerrance
0 votes
    Amazon recently added the wonderful feature of tagging EC2 instances with key-value pairs to make the management of ... the tags? Select the correct answer from above options...
asked Feb 3, 2022 in Education by JackTerrance
0 votes
    Bit confused here, I have an on-demand instance but do I get charged even when I stop the instance? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    Is it possible to clone an EC2 instance data and all? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    I am trying to stop an Amazon EC2 instance and get the warning message Warning: Please note that any data on ... Amazon EC2 instance? Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
0 votes
    A guy I work with gave me the EC2 credentials to log onto his EC2 console. I was not the one who set it up ... these show up as blank. Select the correct answer from above options...
asked Feb 2, 2022 in Education by JackTerrance
...