Lately I’ve seen some customers struggle with their external USB drives formatted in NTFS on CentOS servers. Because it’s such a common problem I decided to make a very quick howto on the subject.
The Fuse packages found in the default CentOS repository haven’t been compiled with NTFS-3G support. Even though there are fuse-ntfs3g packages available! To get around this I prefer to enable the RPM Forge repository. It’s very easy to do so.
On 32bit platforms:
# wget http://apt.sw.be/redhat/el5/en/i386/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.i386.rpm # rpm -i rpmforge*i386.rpm
On 64bit platforms:
# wget http://apt.sw.be/redhat/el5/en/x86_64/RPMS.dag/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm # rpm -i rpmforge*x86_64.rpm
Moving on:
# rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt # yum update
Installing RPM Forge’s Fuse packages and dependencies:
# yum install -y kernel-devel kernel-headers # yum install -y --enablerepo=rpmforge dkms dkms-fuse fuse # yum install -y --enablerepo=rpmforge fuse-ntfs-3g-devel fuse-devel
For some strange reason, the Fuse module in the package isn’t compiled yet. Lucky for us the package maintainer has provided the source code for us:
# cd /usr/src/fuse-2.7.4-1.nodist.rf/ # ./configure # make # make install
And now the part most people seem to forget, insert the Fuse module into the kernel:
# insmod /lib/modules/2.6.18-164.9.1.el5/kernel/fs/fuse/fuse.ko
Mount the external disk:
# mount -t ntfs-3g /dev/sdc1 /mnt/usb/ # df -h Filesystem Size Used Avail Use% Mounted on ... /dev/sdc5 466G 79M 466G 1% /mnt/usb
That’s all there’s to it!
Be First to Comment