Is it possible to mount a NTFS formatted VHDX to CentOS or Ubuntu without losing data?
NashBrydges last edited by
As the title suggests, this isn't something I've done before and I'm hoping to mount a NTFS formatted VHDX to a Linux VM (CentOS or Ubuntu) without losing any of the data in the VHDX. Currently holds 19 TB of data and I'd rather not have to transfer it out and back in.
A new client is running Win Server 2012 R2 with Hyper-V role. He already has 2 same OS VMs and is also running the host as a file server. One VM is an IIS web server and the other is set aside for proprietary software that the vendor won't support if there are any other roles for the VM. He was smart enough to have the data in the VHDX so it's movable but he can't run as a file server when running both VMs because of licensing. I was thinking of simply setting up a CentOS VM and mounting the VHDX and using that as his simple file server.
I've mounted external volumes in CentOS and Ubuntu before but always formatted the logical volume once created. This time I'm hoping to simply attach and have it serve-up files.
Obsolesce last edited by
Are you attaching the .VHDX to a Linux VM? If you are, I would think that would be the same as attaching a regular physical HDD to one.
In that case, I have done it. I have a CentOS file server set up in which it's large data store is a physical NTFS volume.
Way back when I set it up, I had to install NTFS-3G.
I kept my notes on it. There's no company specific info, so I'll just copy it as I have it listed. If there's extra stuff just ignore it, or alter it for your environment.
Note: versions may be newer than in my notes... so you'll have to check them.
Install NTFS-3G Open terminal Type> rpm -ivh http://dl.fedoraproject.org/pub/epel/6/$(uname -i)/epel-release-6-8.noarch.rpm Type> yum clean all Type> nano /etc/yum.repos.d/epel.repo use baseurl instead of mirrorlist (comment out mirrorlist and uncomment baseurl) Type> yum clean all Type> yum install ntfs-3g Data/Home Mount Setup Open terminal Type> mkdir /media/DATA Type> mkdir /media/DATA/home Type> chmod 0777 /media/DATA/home Auto mount the DATA Raid In terminal, type> nano /etc/fstab Add the following line: /dev/sdb1 /media/DATA ntfs-3g windows_names,permissions 0 0 Comment out the home mount Save and close fstab Make sure home is unmounted (and the DATARAID if it's mounted) Type> umount /home Delete the /home directory Type> rmdir /home Type> ln -s /media/DATA/home / (creates symlink to home in / named /home) Type> ln -s /media/DATA / (creates symlink to DATA in /) Type> mount -a (reloads fstab) You should now have your Dataraid mounted as DATA in /media/DATA and a funcitonal symlink for /home and /DATA Test this by creating a new user. Doing so should automatically create the users home directory in /media/DATA/home using the /home symlink.
I mounted my NTFS HDD from windows on my desktop after I installed Korora to SSD
No need for anything special. So Fedora 25 base
NashBrydges last edited by
Awesome! Thanks guys, I'll give that a try.
Yes you can. And if you are unsure of yourself, mount it as RO to ensure that it is safe.