[关闭]
@cdmonkey 2015-12-04T08:34:24.000000Z 字数 2439 阅读 997

Mount NTFS

操作系统


检查设备

我们手头有一块容量为4T的移动硬盘,并且插在了服务器上,因此我们可以通过下面的操作来查看新增加的硬盘:

  1. [root@POSP01 ~]# fdisk -l
  2. ...
  3. WARNING: The size of this disk is 4.0 TB (4000787030016 bytes).
  4. DOS partition table format can not be used on drives for volumes
  5. larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
  6. partition table format (GPT).
  7. Disk /dev/sdb: 4000.7 GB, 4000787030016 bytes
  8. 255 heads, 63 sectors/track, 60800 cylinders
  9. Units = cylinders of 16065 * 4096 = 65802240 bytes #Sector size=4096
  10. Device Boot Start End Blocks Id System
  11. /dev/sdb1 * 1 60801 3907018332 7 HPFS/NTFS
  1. [root@POSP01 ~]# parted /dev/sdb p
  2. Warning: Device /dev/sdb has a logical sector size of 4096. Not all parts of GNU Parted support this at the moment, and the working code is HIGHLY EXPERIMENTAL.
  3. Error: Unable to open /dev/sdb - unrecognised disk label.
  4. #由于没有打上硬盘标签,所以无法列出分区信息。
  5. Information: Don't forget to update /etc/fstab, if necessary.

由上面的提示信息可知,当前的“RHEL/CentOS5”系统自带的分区具不能正确地处理4096B扇区大小。

Install Rpmforge

rpmforge应该算是第三方的软件源,其拥有多达4000多种软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。由于系统默认软件源里的软件太少了,可以将这个源添加进来。

RHEL/CentOS 5:

  1. rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm
  2. ---------------------
  3. #Install NTFS-3G:
  4. [root@POSP01 ~]# yum install -y fuse-ntfs-3g

RHEL/CentOS 6:

  1. rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm

Mount

  1. [root@POSP01 ~]# ntfs-3g /dev/sdb1 /ntfs/
  2. Failed to read last sector (976754582): Invalid argument
  3. HINTS: Either the volume is a RAID/LDM but it wasn't setup yet',
  4. or it was not setup correctly (e.g. by not using mdadm --build ...),
  5. or a wrong device is tried to be mounted,
  6. or the partition table is corrupt (partition is smaller than NTFS),
  7. or the NTFS boot sector is corrupt (NTFS size is not valid).
  8. Failed to mount '/dev/sdb1': Invalid argument
  9. The device '/dev/sdb1' doesn't seem to have a valid NTFS'.
  10. Maybe the wrong device is used? Or the whole disk instead of a
  11. partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?

结果是无法挂载,只好又换了另一块1T的移动硬盘插上去:

  1. [root@POSP01 ~]# fdisk -l
  2. ...
  3. Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
  4. 1 heads, 63 sectors/track, 31008336 cylinders
  5. Units = cylinders of 63 * 512 = 32256 bytes
  6. Device Boot Start End Blocks Id System
  7. /dev/sdc1 * 2 31008256 976760032+ 7 HPFS/NTFS
  1. [root@POSP01 ~]# parted /dev/sdc p
  2. Model: Seagate Portable (scsi)
  3. Disk /dev/sdc: 1000GB
  4. Sector size (logical/physical): 512B/512B #Sector size=512
  5. Partition Table: msdos
  6. Number Start End Size Type File system Flags
  7. 1 32.3kB 1000GB 1000GB primary ntfs boot
  8. Information: Don't' forget to update /etc/fstab, if necessary.
  9. ---------------------
  10. #Mount:
  11. [root@POSP01 ~]# ntfs-3g /dev/sdc1 /ntfs/
  12. The disk contains an unclean file system (0, 0).
  13. The file system wasn't' safely closed on Windows. Fixing.
  14. #终于挂在成功,可以正常浏览分区内容了。
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注