I have an AWS instance with an encrypted EBS volume, which is at /dev/sdb
.
I am trying to mount it via ansible using the command:
- name: format new volume
filesystem: fstype=xfs dev=/dev/xvdb
- name: edit fstab and mount the vol
action: mount=/home/ec2-user/ name= src=/dev/xvdb opts=noatime fstype=xfs state=mounted
I have put in xvdb
after the suggestion from this answer: https://serverfault.com/a/365841/314047
However, I still get the error: "msg": "Device /dev/xvdb not found."
PS: I get this error with /dev/sdb
too.
This is the O/P of my ls -l /dev/sd* /dev/xv*
lrwxrwxrwx 1 root root 4 Feb 10 06:45 /dev/sda -> xvda
lrwxrwxrwx 1 root root 5 Feb 10 06:45 /dev/sda1 -> xvda1
lrwxrwxrwx 1 root root 4 Feb 10 06:45 /dev/sdb -> xvdb
brw-rw---- 1 root disk 202, 0 Feb 10 06:45 /dev/xvda
brw-rw---- 1 root disk 202, 1 Feb 10 06:45 /dev/xvda1
brw-rw---- 1 root disk 202, 16 Feb 10 06:45 /dev/xvdb
This command: cat /proc/partitions
gives me this:
major minor #blocks name
202 0 8388608 xvda
202 1 8386543 xvda1
202 16 8388608 xvdb
Is there anything which I did wrong? How do I mount my volume and cd into it?