If you want to mount a FAT32-formatted (or presumably FAT as well) USB drive in your FreeNAS server, here’s how you do it in FreeNAS 8.
First, view your console either using the servers display, or the web interface (Settings > Advanced > Show Console Message in the footer).
Plugging in your device should display messages similar to the following:
Feb 27 20:56:34 freenas kernel: ugen1.2: <JMicron> at usbus1 Feb 27 20:56:34 freenas kernel: umass1: <MSC Bulk-Only Transfer> on usbus1 Feb 27 20:56:34 freenas kernel: da1 at umass-sim1 bus 1 scbus7 target 0 lun 0 Feb 27 20:56:34 freenas kernel: da1: <Hitachi HTS547550A9E384 A50A> Fixed Direct Access SCSI-2 device Feb 27 20:56:34 freenas kernel: da1: 40.000MB/s transfers Feb 27 20:56:34 freenas kernel: da1: 476940MB (976773168 512 byte sectors: 255H 63S/T 60801C)
From this, we know the device is /dev/da1.
Next, either open the web console or SSH, so we can see what the partitions are and mount it
Now, we’ll see what the partition listings are
ls -l /dev/da1*
crw-r—– 1 root operator 0, 133 Feb 27 20:56 /dev/da1
crw-r—– 1 root operator 0, 134 Feb 27 20:56 /dev/da1s1
Now you know the disk is /dev/da1
, and the partition is /dev/da1s1
.
Now, lets mount it.
You only need sudo if you’re not already root (you may need to edit the /etc/sudoers file)
cd /mnt sudo su mkdir usb mount_msdosfs /dev/da1s1 usb1
If you receive this message:
mount_msdosfs: /dev/da1s1: Disk too big, try '-o large' mount option: Invalid argument
Then listen, and do instead:
mount_msdosfs -o large /dev/da1s1 usb1
Now, verify that it has mounted correctly:
mount
You should see a line in the output which lists /dev/da1s1:
/dev/da1s1 on /mnt/usb1 (msdosfs, local)
And you’re all set. Don’t forget to umount when you’re done!