Mount USB External Drive

Status
Not open for further replies.

fp21

Cadet
Joined
Oct 29, 2015
Messages
2
Hi,

I'm new to freenas. I have some usb hard drive formatted with ExtFAT and FAT32
Now I want to get at the data with my freenas by mounting them on usb2. The problem doesn't seem to be new. Still the threads I've found didn't solved my problem, as they mostly use NTFS.

Although its possible to copy the data via network, the the transfer speed is like 10 MB/s, witch I would like to avoid.

So this is what I tried:
--------------------------------------------------------------------------------
1) tried to mount a flash disk with FAT32 on the root shell
# mkdir /mnt/usb
# mount -t vfat /dev/da1s1 /mnt/usb/
mount: /dev/da1s1: Operation not supported by device

2) tried to install fusefs-exfat and mount a flash disk with ExtFAT from inside a jail
Jail ‣ Add Jail
Jail ‣ View Jails ‣ Shell
#pkg install fusefs-kmod
Installed packages to be UPGRADED:
pkg: 1.4.12 -> 1.6.1_1
New packages to be INSTALLED:
fusefs-kmod: 0.263233_1,1
# cd /usr/ports/sysutils/fusefs-exfat; make install clean
===> Applying FreeBSD patches for py27-setuptools27-5.5.1_1
Ignoring previously applied (or reversed) patch.
2 out of 2 hunks ignored--saving rejects to pkg_resources.py.rej
=> Patch patch-pkg_resources failed to apply cleanly.
*** [do-patch] Error code 1

Stop in /usr/ports/devel/py-setuptools27.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/scons.
*** [build-depends] Error code 1

Stop in /usr/ports/sysutils/fusefs-exfat.
--------------------------------------------------------------------------------

So my question is now: How can I mount the drives? And does someone know how to compile the fusefs-exfat on freenas 9.3-RELEASE-p25.

Additional could I use the fusefs-exfat drivers from outside of the jail? Or would I had to mount the drive from inside?

Thanks in advance.
 

fp21

Cadet
Joined
Oct 29, 2015
Messages
2
I tried the GUI for FAT32 first but didn't worked, so I changed to terminal.
It seems to be a bug that wont be fixed anymore in 9.3 according to bugs.freenas.org (https://bugs.freenas.org/issues/7561)
Second I come from linux where fat can be mounted by vfat, but in freebsd its msdosfs.
so the correct command would be

#mount -t msdosfs /dev/da0s1 /mnt/usb/
or
#/sbin/mount_msdosfs /dev/da0s1 /mnt/usb/

For the exfat its right that it isn't supported, but there is a fuse module fusefs-exfat which is also available for freebsd.
But this relies on python which wasn't handled correctly by the makefile.

So I installed it manually

#pkg install py27-setuptools27

After that it also installed portmaster to bypass the makefile errors and the kernel module with the pkg manger, as the portmaster couldn't this.

#pkg install portmaster
#pkg install fusefs-kmod

But finally I could build the fusefs-exfat module

#portmaster sysutils/fusefs-exfat

So now the system can mount extfat, but as I assumed it cannot mount from inside the jail. At least I got a permission problem.

# mount.exfat /dev/da0s1 /mnt/usb/
FUSE exfat 1.0.1
mount_fusefs: /dev/fuse on /mnt/usb: Operation not permitted
fuse: failed to mount file system: No such file or directory

I tied to allow non-root users, but fuse doesn't seem to be affected by it

#sysctl vfs.usermount=1

Any Ideas to solve the permission problem? and yes i know https://xkcd.com/763/
 

m0nkey_

MVP
Joined
Oct 27, 2015
Messages
2,739
Are you trying to do this without being inside a jail? If so, you're out of luck. Any modifications you make outside of the GUI will either break things or be wiped out next reboot or update.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Just for the record, you can't do what you want to do from inside a jail. Last time I tried it you *could* mount msdosfs from the main OS, but you'd have to copy the data off the drive manually, etc since you're doing stuff "behind the back of the middleware". Not sure if it still works since it's been quite a while since I tried to do it.
 
Status
Not open for further replies.
Top