Wednesday, June 8, 2011

Mounting external USB drive formatted NTFS to my FreeNAS server.

SkyHi @ Wednesday, June 08, 2011
This is a quick post on how to mount an external USB NTFS formatted hard drive (or memory stick) to FreeNAS. All that’s needed is to load the fuse driver, but it had me stumped for a bit until I found it in a forum post.
First things first, let’s plug in our drive and find out the device ID FreeNAS assigns it.
# dmesg
umass1: <ASMedia AS2105, class 0/0, rev 2.10/1.00, addr 3> on uhub4
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <ST950042 0AS 0002> Fixed Direct Access SCSI-0 device 
da1: 40.000MB/s transfers
da1: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)

Now we create a mount point for the drive and try mount it like we normally would.
# mkdir /mnt/usb
# mount -t ntfs /dev/da1s1 /mnt/usb/
You’ll receive the following error:
fuse: failed to open fuse device: No such file or directory
Now lets load the fuse driver and try again.
# kldload fuse
# mount -t ntfs /dev/da1s1 /mnt/usb/
# ls -l /mnt/usb
total 4589868
drwxrwxrwx  1 root  wheel        4096 Sep 25 17:48 $RECYCLE.BIN
drwxrwxrwx  1 root  wheel           0 Nov 27 14:25 .Trashes
-rwxrwxrwx  1 root  wheel        4096 Nov 22 18:15 ._.Trashes
It’s probably easier to load the driver on boot instead of loading it manually like I have above. I haven’t tried it, but it should work if you call it from loader.conf. I can reboot my NAS at the moment, but if someone wants to give it a shot and post to the comments, that would be great. You can follow instructions on how to edit loader.conf in a previous post [1] of mine.