工作中挂在windows硬盘的时遇到错误,记录下来以供学习的人参考。

下载ntfs-3g软件:

yum install ntfs* -y

挂在ntfs硬盘:

[root@iZ28wzpkmmqZ ~]# mount -t ntfs-3g /dev/xvdb1 /opt/NTFS signature is missing.Failed to mount '/dev/xvdb1': Invalid argumentThe device '/dev/xvdb1' doesn't seem to have a valid NTFS.Maybe the wrong device is used? Or the whole disk instead of apartition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

提示硬盘错误,修复一下:

[root@iZ28wzpkmmqZ ~]# ntfsfix /dev/xvdb1Mounting volume... NTFS signature is missing.FAILEDAttempting to correct errors... NTFS signature is missing.FAILEDFailed to startup volume: Invalid argumentNTFS signature is missing.Trying the alternate boot sectorUnrecoverable errorVolume is corrupt. You should run chkdsk.

磁盘还是错误,错误提示建议用chkdsk修复:

因为硬盘是别人在阿里云上打的快照然后发给我的,我也没在windows上测试是否正常。现在不得不把这块硬盘挂到windows上了,检查果然有问题,然后修复了一下。

重新挂到linux下,正常。