How to mount a NTFS disk in XenServer 7

Ever needed to mount a NTFS disk in XenServer 7? If you are trying to copy content from a NTFS disk/drive you will see that XenServer doesn’t supports NTFS by default. Most tutorials I’ve found recommended to install RPMforge which, unfortunately, is discontinued.

But here’s a very easy fix, you can use the EPEL repository as follows:

1. Go to EPEL’s website and get the command for EL7. Example:

su -c 'rpm -Uvh http://download.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-LATEST_VERSION.noarch.rpm'

Where “LATEST_VERSION” is the latest EPEL version.

2. Update YUM:

yum update

3. Install “ntfs-3g”, “ntfsprogs” and “ntfsfix”:

yum install ntfs-3g ntfsprogs ntfsfix

4. List all drives:

fdisk -l

You will see a list of drives. Here’s an example of my 2TB drive:

Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk label type: dos
Disk identifier: 0x000a8d4e

Device Boot Start End Blocks Id System
/dev/sdc1 2048 3907026943 1953512448 7 HPFS/NTFS/exFAT

In this case the desired drive is “/dev/sdc” and partition is /dev/sdc1

5. Fix any potential errors on your drive:

ntfsfix /dev/sdX

Where “sdX” represents the NTFS partition you want to mount. You should see something like this:

Mounting volume... The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
FAILED
Attempting to correct errors...
Processing $MFT and $MFTMirr...
Reading $MFT... OK
Reading $MFTMirr... OK
Comparing $MFTMirr to $MFT... OK
Processing of $MFT and $MFTMirr completed successfully.
Setting required flags on partition... OK
Going to empty the journal ($LogFile)... OK
Checking the alternate boot sector... OK
NTFS volume version is 3.1.
NTFS partition /dev/sdc1 was processed successfully.

6. Create a new directory and mount the NTFS partition. In this example we’ll create a “/ntfs” directory and mount “dev/sdc1”:

mkdir /ntfs
mount /dev/sdc1 /ntfs

That’s it. CONGRATULATIONS! Please let me know if you have any questions or corrections by leaving a comment bellow.

Was this tutorial useful? Buy me a drink by using the “donate” button below. 🙂

1 Comment

Leave a Comment

Your email address will not be published.