HOWTO Add NTFS support to RHEL 5 / CentOS 5
From Consultancy.EdVoncken.NET
Adding read/write NTFS support to RHEL 5 / CentOS 5 requires a couple of steps:
Contents |
Install FUSE support
FUSE stands for "Filesystem in Userspace". Many different filesystems have been implemented on top of the FUSE library.
For this article, I am using a CentOS 5 installation, x86_64, Xen guest (DomU).
# uname -a Linux localhost.localdomain 2.6.18-128.1.10.el5xen #1 SMP Thu May 7 11:07:18 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
- Ensure that the appropriate kernel development files are installed (you may need to install additional packages for developing software)
# yum install kernel-headers kernel-xen-devel
Note: if the ./configure command fails in the FUSE section below, re-check that you have the proper kernel-devel or kernel-xen-devel package installed, depending on the kernel that you are running.
Download and install FUSE
- Download the latest stable version of FUSE
- Configure, make and install FUSE:
# tar xvf fuse-2.7.4.tar.gz # cd fuse-2.7.4 # ./configure # make # make install
Note: you will want to keep the source code available in case you update the kernel.
Configure FUSE to start automatically
Make sure the /etc/init.d/fuse script contains the following lines at the top:
#!/bin/sh # # chkconfig: 2345 90 10 # description: Load the fuse module and mount the fuse control filesystem. #
Add the FUSE service to the list of startup items, and start the service:
# chkconfig --add fuse # service fuse start Loading fuse module. Mounting fuse control filesystem.
You can check the status using the service command:
# service fuse status Checking fuse filesystem ok.
What to do after installing an updated kernel
Since FUSE is a kernel module, chances are that a kernel update will disable all FUSE functionality.
To rebuild the FUSE module, run the following commands in the source directory:
# ./configure # make clean # make install
Restart FUSE:
# service fuse restart
Verify that FUSE is available again:
# service fuse status Checking fuse filesystem ok.
Install NTFS-3G support
Download the latest stable version from the NTFS-3G website.
# tar zxvf ntfs-3g-2009.4.4.tgz # cd ntfs-3g-2009.4.4 # ./configure # make # make install
Configure and use NTFS support
In this example, I will be mounting an NTFS drive containing video files:
# mkdir /mnt/video # mount -t ntfs-3g /dev/sda1 /mnt/video/
Check that the filesystem was mounted properly:
# mount ... fusectl on /sys/fs/fuse/connections type fusectl (rw) /dev/sda1 on /mnt/video type fuseblk (rw,allow_other,blksize=4096)