How to mount NTFS mobile hard drives in Linux (SLES)

Source: Internet
Author: User

Problem description:

The dmp exported through the test environment is too large, but it must be imported to the production server as soon as possible, after the network room is connected to the firewall, it is found that the test network is m while the production network is m expensive, but it cannot play any role, even if the networklink efficiency is too low, considering that the physical locations of the two devices are far away from each other and cannot be directly connected through a gigabit line, we finally choose to use the mobile hard disk as the intermediate transmission media.


Solution:

When an NTFS hard disk is mounted in Linux, an error is reported.Unknown filesystem type 'ntfs'In this case, you need to use a third-party plug-in NTFS-3G to load the NTFS Format hard disk. The NTFS-3G is an open source software that supports reading and writing NTFS format partitions in Linux, FreeBSD, Mac OS X, NetBSD, and Haiku operating systems. The main steps are as follows:



1. Install gcc and other compiling environments (Prerequisites)


2. Download the installation NTFS-3G (stable version is recommended)

Http://www.tuxera.com/community/ntfs-3g-download/


3. Installation Procedure (root User)
Tar-xvzf ntfs-3g_ntfsprogs *. tgz
Cd ntfs-3g_ntfsprogs *
./Configure
Make
Make install

4. Check NTFS hard disk partition information (sd * 1 pay attention to the actual situation)
Fdisk-l
---------------------------------
Device Boot Start End Blocks Id System
/Dev/sdg1 2048 1953525163 976761558 7 HPFS/NTFS/exFAT

4. Mount partitions
Mkdir/mnt/ntfs
Mount-t ntfs-3g/dev/sdg1/mnt/ntfs
# After the partition mounting is completed, enter the/mnt/ntfs Directory, which is the partition of the mobile hard disk.

5. Detach a partition
Umount/dev/sdg1

6. Mount the mobile hard disk automatically at startup and edit the/etc/fstab file.
# Back up data before modification
Cp/etc/fstab/etc/fstabbak
# Edit. Add the following information at the end to mount the disk in read/write mode.
Vi/etc/fstab
---------------------------------
/Dev/sdg1/mnt/ntfs ntfs-3g defaults 0 0
# Save and exit
: X
# The mobile hard disk will be automatically mounted after the machine is restarted

7. When unmounting umount, the following message is displayed:
Device is busy.
# Solution: fuser
# Displays the current program's use of a file, mount point, or even network port on the disk, and provides detailed information about the program process.
Fuser-m-v/media/SLES100_001
---------------------------------
USER PID ACCESS COMMAND
/Media/SLES100_001: root 8153 .. c .. bash

# Then you can add a-k parameter to kill the processes in use!
Fuser-m-k/media/SLES100_001
---------------------------------
/Media/SLES100_001: 8153c

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.