Search code examples
amazon-ec2volumemount

Why does my system change my device from /dev/sdj to /dev/xvdj?


I have an Amazon EC2 instance. I booted up a volume and attached it to /dev/sdj. I edited my fstab file to have the line

/dev/sdj /home/ec2-user/mydirectory xfs noatime 0 0

Then I mounted it (sudo mount /home/ec2-user/mydirectory)

However, running the "mount" command says the following:

/dev/xvdj on /home/ec2-user/mydirectory type xfs (rw,noatime)

What? Why is it /dev/xvdj instead of /dev/sdj?


Solution

  • The devices are named /dev/xvdX rather than sdX in 11.04. This was a kernel change. The kernel name for xen block devices is 'xvd'. Previously Ubuntu carried a patch to rename those devices as sdX. That patch became problematic.

    https://askubuntu.com/a/47909