mount

2020053019:02

mount 出現的問題
"mount: /mnt/xvdf1: wrong fs type, bad option, bad superblock on /dev/xvdf1, missing codepage or helper program, or other error."
有可能是硬碟 partition uuid 重覆
 
 # ls -l /dev/disk/by-uuid/ 
total 0 
lrwxrwxrwx 1 root root 11 May 25 03:27 2753b570-611a-44cb-8bd2-888283108b55 -> ../../xvda1  

**Attach Volume 後 

# lsblk
NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda    202:0    0   8G  0 disk
└─xvda1 202:1    0   8G  0 part /
xvdf    202:80   0   8G  0 disk
└─xvdf1 202:81   0   8G  0 part

# ls -l /dev/disk/by-uuid/ 
total 0 
lrwxrwxrwx 1 root root 11 May 25 03:28 2753b570-611a-44cb-8bd2-888283108b55 -> ../../xvdf1 
*** xvda1 不見了 ==> 因為 uuid 重覆 

# mount  /dev/xvdf1 /mnt/xvdf1/
mount: /mnt/xvdf1: wrong fs type, bad option, bad superblock on /dev/xvdf1, missing codepage or helper program, or other error.

查詢目前的
# xfs_db -c uuid /dev/xvdf1
UUID = 2753b570-611a-44cb-8bd2-888283108b55

設定新的 uuid
# xfs_admin -U generate /dev/xvdf1
Clearing log and setting UUID
writing all SBs
new UUID = 6bbdf868-e979-4e83-97ed-86c8b9ef12d0

# mount /dev/xvdf1 /mnt/xvdf1
成功 mount

也可不修改 uuid 直接 mount
# mount -o nouuid /dev/xvdf1 /xvdf1