Linux (SLES) Mount NTFS mobile hard drive practice

Source: Internet
Author: User

Description of the problem:

Because the test environment to export the DMP is too large, but required to import into the production server as soon as possible, please network room through the firewall found that test network 100M and production network is 1000M but can not play whatever role even through the networklink efficiency is too low, Considering that the physical location of the two devices is far from being able to connect directly through the gigabit line, the last choice is to use the mobile hard disk as the transfer medium.


How to resolve:

Linux mount NTFS format hard disk will be error unknown filesystem type ' NTFS ', then need to use third-party plug-in ntfs-3g to load NTFS-formatted hard disk. The ntfs-3g is an open source software that supports reading and writing NTFS-formatted partitions in Linux, FreeBSD, Mac os X, NetBSD, and haiku operating systems. Basic operating procedures such as the following:



1. Install a compilation environment such as GCC (prerequisite preparation)


2. Download and install ntfs-3g (stable version recommended)

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


3. Installation steps (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 Note 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
#分区挂载完毕, enter the/mnt/ntfs folder, which is the partition of the removable hard disk

5. Unmount the partition
Umount/dev/sdg1

6. Boot your own active drive, edit the/etc/fstab file
#更改之前先备份
Cp/etc/fstab/etc/fstabbak
#编辑, mount the disk in read-write mode by adding the following information at the end
Vi/etc/fstab
---------------------------------
/dev/sdg1/mnt/ntfs ntfs-3g Defaults 0 0
#保存, exit
: X
#重新启动机器就会自己主动挂载移动硬盘

7. When you cancel the Mount Umount, the following prompt appears:
Device is busy.
#解决方法: Fuser
#能够显示出当前哪个程序在使用磁盘上的某个文件, mount points, and even network ports, and give specific information about the process.
Fuser-m-v/media/sles100_001
---------------------------------
USER PID ACCESS COMMAND
/media/sles100_001:root 8153.. C.. bash

#然后能够加入一个-K parameters take the process out of use!
Fuser-m-k/media/sles100_001
---------------------------------
/media/sles100_001:8153c

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.