You might get a warning unknown file system type ‘ntfs’ when trying to mount an NTFS disk on a CentOS server.
To overcome this issue, you need the epel repositories enabled. If you haven’t done this before, just get the epel rpm file from the websites below and import them using rpm.
Note that the rpm files are different for CentOS 5 and CentOS 6.
#CentOS 5 wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm #CentOS 6 wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Get them via wget. If you get an error saying there is no such file, just browse the directory listing to get the exact version.
After downloading them, import them like this:
rpm -Uvh epel-release-*.rpm
Now we have EPEL enabled.
Install ntfs-3g and fuse
Now we should install the ntfs-3g and fuse packages using yum.
yum install ntfs-3g ntfs-3g-devel fuse fuse-devel fuse-libs
Mounting and Unmounting
Now you can simply mount and unmount the ntfs file system.
/sbin/mount.ntfs-3g /dev/sdb1 /media/usb umount /dev/sdb1
Of course the lines above assume you have the device /dev/sdb1 as the usb, and you have created a folder /media/usb.
You can see that unmounting is also quite simply, just like an ordinary disk.
Removing the EPEL Repo
If you don’t want to keep EPEL in your repo for some reason, you can simply remove.
Find the packages name using grep, assuming it is epel-release-6-8 you can use the commands below:
rpm -qa | grep epel # output is epel-release-6-8 yum remove epel-release-6-8 yum clean all