This tutorial shows you how to mount NTFS partition in Centos 5.5 Linux operating system. It should be also applicable for any Linux distribution like Slackware, Debian, Ubuntu, Redhat, Fedora, Gentoo etc.
Our company just bought a USB external hard drive for backing up important data (mostly Windows-related data files). The brand of the hard drive is WD (Western Digital) My Passport Essential portable hard drive. The WD comes with pre-formatted NTFS file system.
Some of the data stored in a Linux server running Centos 5.5. The total size of the data is huge enough (about 350 GB) so it will take a couple of hours if the backup process through a network connection. The data that currently stored in the Centos 5.5 will be copied to the WD. Since the WD is in NTFS file system, I have to make the Centos able to read and write files to the WD.
Here is the step by step how to mount read/write NTFS file system in Centos 5.5
1. Plug the WD in to a USB port
Once the WD plugged in, the Centos will initialize the driver to detect the WD:
Initializing USB Mass Storage driver... scsi1 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 2 usb-storage: waiting for device to settle before scanning usbcore: registered new driver usb-storage USB Mass Storage support registered. Vendor: WD Model: My Passport 0730 Rev: 1015 Type: Direct-Access ANSI SCSI revision: 06 SCSI device sdb: 976707584 512-byte hdwr sectors (500074 MB) sdb: Write Protect is off sdb: Mode Sense: 47 00 10 08 sdb: assuming drive cache: write through SCSI device sdb: 976707584 512-byte hdwr sectors (500074 MB) sdb: Write Protect is off sdb: Mode Sense: 47 00 10 08 sdb: assuming drive cache: write through sdb: sdb1 sd 1:0:0:0: Attached scsi disk sdb sd 1:0:0:0: Attached scsi generic sg5 type 0 Vendor: WD Model: SES Device Rev: 1015 Type: Enclosure ANSI SCSI revision: 06 scsi 1:0:0:1: Attached scsi generic sg6 type 13 usb-storage: device scan complete
See the above logs. The WD is attached to /dev/sdb1. We will mount it later to a mount point folder.
2. Install ntfs-3g package
To be able to read and write to NTFS partision, Centos need the ntfs-3g package installed in it. Let’s install it.
[root@centos ~]# yum install ntfs-3g
3. Create a mount point for the WD
As in step 1, the WD was attached to /dev/sdb1. Here we need to create a mount point for the WD. Let’s create it as /mnt/wd.
[root@centos ~]# mkdir /mnt/wd
4. Mount the WD
Now it is the time to mount the WD to a mount point (/mnt/wd)
[root@centos ~]# ntfs-3g -o rw,umask=000 /dev/sdb1 /mnt/wd
Take a look at the option (-o = options):
– rw = read and write capabilities
– 000 = full access to every-body.
5. Check the mount status
Make sure that the WD has been mounted successfully. Issue the following command to check the mount status of the WD.
[root@centos ~]# mount|grep sdb /dev/sdb1 on /mnt/wd type fuseblk (rw,allow_other,blksize=4096,default_permissions)
We can see that, the WD mounted with read/write permission. Now we can copy any files / data from the Centos 5.5 to the WD hard drive.