尝试安装 ec2 卷时出现以下错误
[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)'
另外,尝试按如下方式安装部件
[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.
答案1
发布对我有用的解决方案,因为我在其他地方没有找到这个......
首先检查 dmesg 以查看实际错误
dmesg | tail
发现错误,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
因此要修复此问题,请使用 nouuid 选项
[ec2-user@ip-172-XX-XX-XX ~]$ sudo mount -o nouuid /dev/xvdf2 /mnt