Mounting a USB drive for backup using fstab

Status
Not open for further replies.

donsev

Explorer
Joined
Jan 15, 2017
Messages
79
Hello,

I'm trying to mount an external USB drive to do a (local) backup of my server. I'm trying to use /etc/fstab to mount it, since I can't find the option in the GUI, but get an error: "fstab: /etc/fstab:8: Inappropriate file type or format". My fstab file:

Code:

freenas-boot/grub  /boot/grub  zfs  rw,noatime  1  0
fdescfs /dev/fd fdescfs rw  0 0
/dev/ada3p1.eli none  swap  sw  0  $
/dev/ada0p1.eli none  swap  sw  0  $
/dev/da0p1.eli  none  swap  sw  0  $
/dev/ada2p1.eli none  swap  sw  0  $
/dev/ada4p1.eli none  swap  sw  0  $
/dev/da1s1 /mnt/ZFS/Shared/Test cifs



If this is not possible, is there anyway to get a VM (ubuntu) to recognize a plugged in USB? I did try other methods of backing up, mainly using my raspberry pi to backup over the network, but it would be great (not to mention faster) if I could backup directly.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
I don't think you want to use "cifs". That is a network file system used primarily by Microsoft Windows.

Guessing you want FAT or VFAT. I don't know the FreeBSD naming convention. Further, you MUST have all 6 fields for an entry. And last, I think FreeNAS will forget those changes on reboot.

In general, you perform the action from the command line first to get the syntax. And if warranted, add it to /etc/fstab after.
 

Thomas102

Explorer
Joined
Jun 21, 2017
Messages
83
Hi,
cifs is for mounting windows smb shares.
Most propable is your usb drive formatted under ntfs, you should look for that on google
 

donsev

Explorer
Joined
Jan 15, 2017
Messages
79
Thanks guys!

So I googled a bit following ya'lls directions and ended up with the following steps.

  1. Code:
    kldload fuse.ko
  2. Code:
    mount_ntfs /dev/da1s1 /mnt/ZFS/Shared/Test
Code 2 alone will result in error: fuse: failed to open fuse device: No such file or directory
You can check the USB drive's name (da1) under Storage -> V

In this example my external drive (da1) will be mounted under the folder Test. Worked great, read and write permissions both enabled by default. Since this is just a temporary mount I didn't bother adding it to fstab. Not sure how fast it transfers files though, is there a way to check if I'm just cp /directory /mnt/ZFS/Shared/Test certain shares?
 
Status
Not open for further replies.
Top