How do I mount a NTFS drive so I can copy the data to an empty drive in FreeNAS

Status
Not open for further replies.

MockY

Dabbler
Joined
Jul 27, 2011
Messages
14
Due to limitations with 3TB drives on legacy operating systems, I am now forced to move on to a different platform for my file server. FreeNAS fit the bill, but since importing NTFS drive wont work in the latest stable build, I figured I could mount the NTFS drive that I already have and simply move over the existing data to an already installed ZFS drive. But I can't find any documentation or forum posts about how do go about to do it.

I am a Linux user so I'm unfamiliar on hoe BSD handles thses things, or in this case, specifically FreeNAS. I tried to create a new directory in /mnt named ntfs and then do a
Code:
mount -t ntfs /dev/ada2 /ntfs

But it fails

Help would be greatly appreciated

Also, I assume that once the drive is mounted, that I could d o a cp -R /ntfs/* /the_empty_drive
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
You have to sniff out the proper partition name, using a couple different tricks. Try looking at the disk with 'gpart show /dev/ada2' and or
doing an 'ls /dev/ada2*'... You will probably see for example something like /dev/ada2p1 or /dev/ada2s1a

That's what you want to try and mount, other than that it looks like you have the right idea. You also might want to try 'mount -t ntfs-3g /dev/your-device-name /ntfs'
 

MockY

Dabbler
Joined
Jul 27, 2011
Messages
14
Thank you very much. That worked just fine. I am copying as we speak.
How does ZFS handle spaces, apostrophes, parenthesis and so forth in directory names by the way? All these drives have majority of the directory names and file names with space in it. I guess I have to wait and see how things goes.
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
I am trying as well to mount an NTFS disk so that I can copy the data into my array, however every time I try I keep getting the error code "No such file or directory."

my device is 'ada1s1'

I have tried using both
mount -t ntfs /dev/ada1s1 /ntfs

and

mount -t ntfs-3g /dev/ada1s1 /ntfs

Nothing is working as planned. Any suggestions would be immensely helpful.

I have even gone so far as to create a directory /mnt/ntfs and set the permissions to mirror my fN created volume permissions. Although it doesn't seem I should have to do that, and sorta sounds counterproductive and borderline irresponsible.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
It definitely sounds like the "No such file or directory" error is because it's not finding a valid mountpoint, but everything you've said you've tried is correct. The permissions shouldn't matter. Are there any other devices showing if you do an 'ls /dev/ada1*' ? Have you tried those?
From what you've described I can't suggest anything other than just verifying your device name.
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
ls /dev/ada1* yields the following responses

/dev/ada1
/dev/ada1s1

When I try with /dev/ada1 I get the same error as before

'mount: /ntfs: No such file or directory'

This is really driving me nuts. I want to copy this data so I can finally feel like I have made progress with this server build...
 

MockY

Dabbler
Joined
Jul 27, 2011
Messages
14
I got the same error as you so I used the full path (let's say you created the directory in /mnt, regardless where I currently were. And I used ntfs and not ntfs-3g
mount -t ntfs /dev/ada1s1 /mnt/ntfs
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
OK, so now I have tried it in all 4 possible configs

mount -t ntfs /dev/ada1s1 /mnt/ntfs
mount -t ntfs /dev/ada1 /mnt/ntfs
mount -t ntfs-3g /dev/ada1s1 /mnt/ntfs
mount -t ntfs-3g /dev/ada1 /mnt/ntfs

All 4 yield the same response. There must be something simple I am missing here.
cut and paste from winscp
/root$ mount -t ntfs /dev/ada1 /mnt/ntfs
mount: /mnt/ntfs: No such file or directory
/root$ mount -t ntfs /dev/ada1s1 /mnt/ntfs
mount: /mnt/ntfs: No such file or directory
/root$ mount -t ntfs-3g /dev/ada1 /mnt/ntfs
mount: /mnt/ntfs: No such file or directory
/root$ mount -t ntfs-3g /dev/ada1s1 /mnt/ntfs
mount: /mnt/ntfs: No such file or directory
 

MockY

Dabbler
Joined
Jul 27, 2011
Messages
14
the ntfs directory is listed when doing a directory listing? ls -l /mnt/
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
Yes...

I get

/mnt$ ls -l /mnt/
total 8
drwxrwxr-x 2 root operator 512 Jul 29 16:58 .snap
drwx------ 5 root CarolandMatt 5 Jul 29 17:20 Media
-rw-r--r-- 1 root 1000 5 Jul 13 13:11 md_size
drwxr-xr-x 2 root wheel 512 Jul 29 17:35 ntfs

But... that just gave me an idea and I think it just worked... at least I didn't get an error message this time.

I deleted, and re-configured a new directory with the correct permissions. I had been using '/mnt/source' in place of '/mnt/ntfs'. Not that it should have mattered, but by resetting everything using 'ntfs' the damn thing went through. Now, for the real test. Accessing '/mnt/ntfs'...
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
AWESOME!!!!!!!!!!!!! By just changing /mnt/source to /mnt/ntfs it worked 100%. Seems a tad ridiculous to me, but I'm just glad it worked. Now to copy all this stuff.
 

TapRackPull

Dabbler
Joined
Jul 20, 2011
Messages
48
MockY what was the end result of your data copy, how did it handle the spaces, hyphens...
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
It should handle all that stuff with filenames just fine. I copied a crap load of stuff from a couple of NTFS drives using rsync and everything turned out fine.
 

Stenull

Dabbler
Joined
Aug 22, 2011
Messages
45
This thread was most helpful! I mounted and start copy using 'cp -R /ntfs1/* /the_empty_drive' with out problem.
after a couple of hours i had to abort the copy task due to a complaining wife :(i have my testing site in bedroom)

So kind of new to unix, my question is can i continue copying with something like this 'cp -u /ntfs1/* /the_empty_drive'?

-u, --update copy only when the SOURCE file is newer
than the destination file or when the destination
file is missing

it sure sounds like it's gonna work like i want to, just want to check if there is something i have to think about.
 

ProtoSD

MVP
Joined
Jul 1, 2011
Messages
3,348
Hi Stenull -

Try using 'rsync'. It does an intelligent copy, looking to see what is there already, what's changed, and just copies what it needs to.

So for example with your folders, you could try:

rsync -av --progress /ntfs1/* /the_empty_drive

-a archive mode, implies recursive, Preserves symbolic links, permissions, timestamp, owner and group
-v verbose
--progress shows which file is copying, how much is left etc.

Hope that helps!
 

Stenull

Dabbler
Joined
Aug 22, 2011
Messages
45
Thanks for quick answer protosd!
Will test that soon as i get home from work :)

UPDATE:
Seems to work pretty nice, running it now, again... had to abort twice due to really slow transfer rates.
have speeds around 28mb/s,
my setup is

OS Version: FreeBSD 8.2-RELEASE-p1
Load Average: 0.27, 0.30, 0.35
FreeNAS Build: FreeNAS-8.0-RELEASE-amd64
4 disks in raidz, those are the target containing 3 caviar black and 1 hitatchi 5k3000
and one hitatchi 5k3000 as the source.

is those speeds normal? when copying the other way under windows 7 i had speeds around 100mb/s+
 
Status
Not open for further replies.
Top