@cdmonkey
2015-12-04T08:34:24.000000Z
字数 2439
阅读 1344
操作系统
我们手头有一块容量为4T的移动硬盘,并且插在了服务器上,因此我们可以通过下面的操作来查看新增加的硬盘:
[root@POSP01 ~]# fdisk -l...WARNING: The size of this disk is 4.0 TB (4000787030016 bytes).DOS partition table format can not be used on drives for volumeslarger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUIDpartition table format (GPT).Disk /dev/sdb: 4000.7 GB, 4000787030016 bytes255 heads, 63 sectors/track, 60800 cylindersUnits = cylinders of 16065 * 4096 = 65802240 bytes #Sector size=4096Device Boot Start End Blocks Id System/dev/sdb1 * 1 60801 3907018332 7 HPFS/NTFS
[root@POSP01 ~]# parted /dev/sdb pWarning: 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.Error: Unable to open /dev/sdb - unrecognised disk label.#由于没有打上硬盘标签,所以无法列出分区信息。Information: Don't forget to update /etc/fstab, if necessary.
由上面的提示信息可知,当前的“RHEL/CentOS5”系统自带的分区具不能正确地处理4096B扇区大小。
rpmforge应该算是第三方的软件源,其拥有多达4000多种软件包,被CentOS社区认为是最安全也是最稳定的一个软件仓库。由于系统默认软件源里的软件太少了,可以将这个源添加进来。
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el5.rf.x86_64.rpm---------------------#Install NTFS-3G:[root@POSP01 ~]# yum install -y fuse-ntfs-3g
rpm -ivh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
[root@POSP01 ~]# ntfs-3g /dev/sdb1 /ntfs/Failed to read last sector (976754582): Invalid argumentHINTS: Either the volume is a RAID/LDM but it wasn't setup yet',or it was not setup correctly (e.g. by not using mdadm --build ...),or a wrong device is tried to be mounted,or the partition table is corrupt (partition is smaller than NTFS),or the NTFS boot sector is corrupt (NTFS size is not valid).Failed to mount '/dev/sdb1': Invalid argumentThe device '/dev/sdb1' 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?
结果是无法挂载,只好又换了另一块1T的移动硬盘插上去:
[root@POSP01 ~]# fdisk -l...Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes1 heads, 63 sectors/track, 31008336 cylindersUnits = cylinders of 63 * 512 = 32256 bytesDevice Boot Start End Blocks Id System/dev/sdc1 * 2 31008256 976760032+ 7 HPFS/NTFS
[root@POSP01 ~]# parted /dev/sdc pModel: Seagate Portable (scsi)Disk /dev/sdc: 1000GBSector size (logical/physical): 512B/512B #Sector size=512Partition Table: msdosNumber Start End Size Type File system Flags1 32.3kB 1000GB 1000GB primary ntfs bootInformation: Don't' forget to update /etc/fstab, if necessary.---------------------#Mount:[root@POSP01 ~]# ntfs-3g /dev/sdc1 /ntfs/The disk contains an unclean file system (0, 0).The file system wasn't' safely closed on Windows. Fixing.#终于挂在成功,可以正常浏览分区内容了。
