首先,要先安裝epel和ntfs-3g:

# yum -y install epel-release-6
....................

Running Transaction
  Installing : epel-release-6-8.noarch                                      1/1
  Verifying  : epel-release-6-8.noarch                                      1/1

Installed:
  epel-release.noarch 0:6-8

Complete!

# yum -y install ntfs-3g ntfsprogs
....................

Installed:
  ntfs-3g.x86_64 2:2016.2.22-3.el6      ntfsprogs.x86_64 2:2016.2.22-3.el6

Complete!

# fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1      243202  1953512032+   7  HPFS/NTFS

↑這是要掛的HD。

# cd /mnt
# mkdir usbhd

↑建立掛載點。

# mount -t ntfs-3g /dev/sdb1 /mnt/usbhd
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Failed to mount '/dev/sdb1': 此項操作並不被允許
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

↑掛載失敗!!

# ntfsfix /dev/sdb1
Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdb1 was processed successfully.

# vi /etc/fstab

/dev/sdb1               /mnt/usbhd              ntfs-3g  rw,umask=0222,defaults 0 0

↑新增這一行。

# mount /mnt/usbhd

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_wks01-lv_root
                       50G   27G   21G  57% /
tmpfs                  16G  160K   16G   1% /dev/shm
/dev/sda2             477M   70M  383M  16% /boot
/dev/sda1             200M  264K  200M   1% /boot/efi
/dev/mapper/vg_wks01-lv_home
                      860G  361G  455G  45% /home
/dev/sdb1             1.9T  122G  1.8T   7% /mnt/usbhd

↑ 掛載成功!!

成功將ntfs的外接HD掛上CentOS6的電腦上了!而且可以讀寫喔!

 

 

參考來源:http://3cbarbarian.blogspot.tw/2016/06/linux-linux-iii.html
http://askubuntu.com/questions/748163/unable-to-mount-ntfs-partition-no-hibernation

arrow
arrow
    文章標籤
    CentOS NTFS USB HD
    全站熱搜

    貓熊麗麗 發表在 痞客邦 留言(0) 人氣()