AWS mounting old volume from old instance to new instance

955 views Asked by At

I did detach old volume from old instance and attach old volume to new instance in aws console.

and I followed this question: Add EBS to Ubuntu EC2 Instance

When I command 'sudo mount /vol'

It shows me 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.

The output of 'dmesg | tail' is below

[ 9.158108] audit: type=1400 audit(1481970181.964:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/NetworkManager/nm-dhcp-helper" pid=705 comm="apparmor_parser" [ 9.158434] audit: type=1400 audit(1481970181.964:9): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/connman/scripts/dhclient-script" pid=705 comm="apparmor_parser" [ 9.178292] audit: type=1400 audit(1481970181.984:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/lxc-start" pid=761 comm="apparmor_parser" [ 9.341874] audit: type=1400 audit(1481970182.148:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/lib/lxd/lxd-bridge-proxy" pid=763 comm="apparmor_parser" [ 11.673698] random: nonblocking pool is initialized [ 11.766032] EXT4-fs (xvda1): resizing filesystem from 2094474 to 2095139 blocks [ 11.766371] EXT4-fs (xvda1): resized filesystem to 2095139 [ 12.716500] cgroup: new mount options do not match the existing superblock, will be ignored [ 236.029463] blkfront: xvdf: barrier or flush: disabled; persistent grants: disabled; indirect descriptors: enabled; [ 236.038716] xvdf: xvdf1

Old volume Attachment information in AWS console is below :

VOLUME_ID (NEW_INSTANCE_NAME):/dev/sdf (attached)
1

There are 1 answers

4
Michael - sqlbot On BEST ANSWER

Your volume has a partition table, as evidenced by...

[ 236.038716] xvdf: xvdf1

...so you need to mount the partition, not the volume.

sudo mount /dev/xvdf1 /path/to/mount-point

You can also see this using lsblk.