5

Am getting the following error while trying to mount a ec2 volume

[ec2-user@ip-172-XX-XX-XX-XX ~]$ sudo mount /dev/xvdf /mnt
mount: /dev/xvdf is write-protected, mounting read-only
mount: unknown filesystem type '(null)'

Also, tried to mount the part as below

[ec2-user@ip-172-XX-XX-XX ~]$ sudo mount /dev/xvdf2 /mnt
    mount: wrong fs type, bad option, bad superblock on /dev/xvdf2,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
virtuvious
  • 271
  • 2
  • 8
  • What is your question, and what did you do already to try and resolve it, that didn't work? Also see: http://serverfault.com/help/how-to-ask – JayMcTee May 27 '16 at 14:44
  • My question is how to resolve the issue that I had. I had shared this because I could not find the answer anywhere else. Btw isnt my question obvious from the errors? – virtuvious May 30 '16 at 13:53

1 Answers1

11

Posting the solution that worked for me as I did not find this else where.....

First checked the dmesg to see the actual error

dmesg | tail

and found the error with duplicate UUID

[180875.598481] XFS (xvdf2): Filesystem has duplicate UUID 379de64d-ea11-4f5b-ae6a-0aa50ff7b24d - can't mount
[180970.058345] XFS (xvdf2): Filesystem has duplicate UUID 379de64d-ea11-4f5b-ae6a-0aa50ff7b24d - can't mount

so to fix this use the nouuid option

[ec2-user@ip-172-XX-XX-XX ~]$ sudo mount -o nouuid /dev/xvdf2 /mnt
virtuvious
  • 271
  • 2
  • 8