Mount widows NTFS partition with ntfs-3g under centos 6.3

Source: Internet
Author: User

Generally, Mount: Unknown filesystem type 'ntfs 'occurs when centos is mounted to a Windows partition '. To mount an NTFS-format disk to centos 6.3
Third-party plug-in ntfs-3g needs to be installed, here we use compile to install the plug-in.

1. Install the compiler. Otherwise, compilation fails.
Yum install gcc
Follow the prompts to complete y Installation

2. Install ntfs-3gcd

    • /Home # Go To The/home directory and download the software to this directory.
    • Wget http://tuxera.com/opensource/ntfs-3g_ntfsprogs-2011.4.12.tgz # download
    • Tar zxvf ntfs-3g_ntfsprogs-2011.4.12.tgz # Extract
    • CD ntfs-3g_ntfsprogs-2011.4.12 # Go To The Directory
    • ./Configure # compile
    • Make # Installation
    • Make install # Install
    • CD .. # Return to the upper-level directory
    • Rm-r-F ntfs-3g_ntfsprogs * # Delete installation package

3. fdisk-L # display widows NTFS hard disk partition information

Disk/dev/SDA: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x4b8cb872

Device boot start end blocks ID system
/Dev/sda1*1 154 1228800 7 HPFs/NTFS
Partition 1 does not end on cylinder boundary.
/Dev/sda2 154 6165 48289792 7 HPFs/NTFS
Partition 2 does not end on cylinder boundary.
/Dev/sda3 6165 59527 428625920 F w95 ext 'd (LBA)
Partition 3 does not end on cylinder boundary.
/Dev/sda4 59527 60802 10240000 12 Compaq diagnostics
Partition 4 does not end on cylinder boundary.
/Dev/sda5 6166 19220 104857600 7 HPFs/NTFS
/Dev/sda6 19220 53153 272565248 7 HPFs/NTFS
/Dev/sda7 53153 53535 3072000 83 Linux
/Dev/sda8 53535 53727 1536000 83 Linux
/Dev/sda9 53727 53854 1024000 82 Linux swap/Solaris
/Dev/sda10 53854 59527 45564928 83 Linux
The information shown above is the information about all split disks.

4. Mount the partition.

[Root @ localhost Home] # cd/mnt/
[Root @ localhost MNT] # mkdir wind
[Root @ localhost MNT] # Mount-T ntfs-3g/dev/sda5/mnt/wind

After the partition is mounted, you can view the corresponding folder under the/mnt directory, that is, the partition of your mobile hard disk.

5. Uninstall

Umount/dev/sda5

6. Edit the/etc/fstab file if you want the system to automatically mount the mobile hard disk at startup.
CP/etc/fstab/etc/fstabbak # back up before changing
VI/etc/fstab # Edit

Use the INSERT command to add the following information at the end to mount the disk in read/write mode.

/Dev/sda1/mnt/winc ntfs-3g defaults 0 0
/Dev/sda5/mnt/wind ntfs-3g defaults 0 0
/Dev/sda6/mnt/wine ntfs-3g defaults 0 0
/Dev/sda7/mnt/winf ntfs-3g defaults 0 0

Run the ESC command to exit.
Http://blog.rekfan.com /? P = 137
: WQ! Save and exit
Now, you only need to restart the machine and the mobile hard disk will be automatically mounted.

 

Unmount:
The following prompt appears when umount:
# Umount/dev/sda1
Umount:/mnt/upan: device is busy.
(In some cases useful info about processes that use
The device is found by lsof (8) or Fuser (1 ))

Solution:
Root@rekfan.com/] # lsof-W/mnt/upan
Command PID user FD type device size/off node name
Bash 31761 root CWD dir 8192 2316326 120526/mnt/upan/rekfan.com _
Root@rekfan.com/] #

Using lsof-W/mnt/upan, we can see that there is a command window in the/mnt/upan/rekfan.com _ 120526 directory, close this window, or exit this mount directory, you can use umount to safely exit the mounted device!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.