FreeNAS on virt-manager/qemu can't mount usb3 drive

jerrac

Dabbler
Joined
Jun 9, 2019
Messages
17
System info:

FreeNAS Version: FreeNAS-11.2-U4.1
16GB of RAM.

I'm running libvirtd and qemu, configuring things via virt-manager. My host OS is Pop_OS 18.04, so basically Ubuntu 18.04.

My issue:

I'm trying to mount an external USB 3 drive so I can backup my data to it.

I'm not sure why, but when I tell virt-manager to use a usb3 controller, I can't mount the drive. If I set it to the default usb2 controller, it mounts.

I was hoping that usb3 would improve my data transfer rate.

For whatever reason, I am unable to add more than 1 USB controller to my vm. I believe that's a limitation of libvirtd, or qemu.

Below is the output I think is useful from the various things I have tried.

(I'm new to the forum, would this have been better posted as a gist or pastebin?)

With USB Controller using usb2:

--------------- Start usb2 output ----------------------
Code:
# tail -f /var/log/messages
9 18:04:55 xunlaichest ugen3.2: <Western Digital My Book 1230> at usbus3
Jun  9 18:04:55 xunlaichest umass0 on uhub1
Jun  9 18:04:55 xunlaichest umass0: <Western Digital My Book 1230, class 0/0, rev 3.00/10.65, addr 2> on usbus3
Jun  9 18:04:55 xunlaichest umass0:  SCSI over Bulk-Only; quirks = 0x8000
Jun  9 18:04:55 xunlaichest umass0:14:0: Attached to scbus14
Jun  9 18:04:55 xunlaichest da0 at umass-sim0 bus 0 scbus14 target 0 lun 0
Jun  9 18:04:55 xunlaichest da0: <WD My Book 1230 1065> Fixed Direct Access SPC-4 SCSI device
Jun  9 18:04:55 xunlaichest da0: Serial Number 574343344532585435535835
Jun  9 18:04:55 xunlaichest da0: 40.000MB/s transfers
Jun  9 18:04:55 xunlaichest da0: 3815415MB (976746240 4096 byte sectors)
Jun  9 18:04:55 xunlaichest da0: quirks=0x2<NO_6_BYTE>
Jun  9 18:04:55 xunlaichest ses0 at umass-sim0 bus 0 scbus14 target 0 lun 1
Jun  9 18:04:55 xunlaichest ses0: <WD SES Device 1065> Fixed Enclosure Services SPC-4 SCSI device
Jun  9 18:04:55 xunlaichest ses0: Serial Number 574343344532585435535835
Jun  9 18:04:55 xunlaichest ses0: 40.000MB/s transfers
Jun  9 18:04:55 xunlaichest ses0: SCSI-3 ENC Device

root@xunlaichest[~]# gpart show
=>        34  7814037101  ada0  GPT  (3.6T)
          34      262144     1  ms-reserved  (128M)
      262178        2014        - free -  (1.0M)
      264192  7813771264     2  ms-basic-data  (3.6T)
  7814035456        1679        - free -  (840K)

=>      40  67108784  ada1  GPT  (32G)
        40    532480     1  efi  (260M)
    532520  66551808     2  freebsd-zfs  (32G)
  67084328     24496        - free -  (12M)

=>        40  7814037088  ada2  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        40  7814037088  ada3  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        40  7814037088  ada4  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        34  7814037101  ada5  GPT  (3.6T)
          34      262144     1  ms-reserved  (128M)
      262178        2014        - free -  (1.0M)
      264192  7813771264     2  ms-basic-data  (3.6T)
  7814035456        1679        - free -  (840K)

=>       63  976746177  da0  MBR  (3.6T)
         63        193       - free -  (772K)
        256  976745984    1  ntfs  (3.6T)


root@xunlaichest[~]# ls /dev/da*
/dev/da0    /dev/da0s1
root@xunlaichest[~]# mkdir /mnt/mybook
root@xunlaichest[~]# mount_ntfs /dev/da0s1 /mnt/mybook
fuse: failed to open fuse device: No such file or directory
root@xunlaichest[~]# kldload fuse
root@xunlaichest[~]# mount_ntfs /dev/da0s1 /mnt/mybook
root@xunlaichest[~]# ls /mnt/mybook
<list of dirs>

--------------- End usb2 output ----------------------


With USB Controller set to usb3:

--------------- Start usb3 output ----------------------
Code:
root@xunlaichest[~]# tail -f /var/log/messages
Jun  9 18:11:10 xunlaichest ugen0.2: <Western Digital My Book 1230> at usbus0
Jun  9 18:11:10 xunlaichest umass0 on uhub0
Jun  9 18:11:10 xunlaichest umass0: <Western Digital My Book 1230, class 0/0, rev 3.00/10.65, addr 1> on usbus0
Jun  9 18:11:10 xunlaichest umass0:  SCSI over Bulk-Only; quirks = 0x8000
Jun  9 18:11:15 xunlaichest umass0: Get Max Lun not supported (USB_ERR_TIMEOUT)
Jun  9 18:11:15 xunlaichest umass0:14:0: Attached to scbus14
Jun  9 18:11:15 xunlaichest da0 at umass-sim0 bus 0 scbus14 target 0 lun 0
Jun  9 18:11:15 xunlaichest da0: <WD My Book 1230 1065> Fixed Direct Access SPC-4 SCSI device
Jun  9 18:11:15 xunlaichest da0: Serial Number 574343344532585435535835
Jun  9 18:11:15 xunlaichest da0: 400.000MB/s transfers
Jun  9 18:11:15 xunlaichest da0: 3815415MB (976746240 4096 byte sectors)
Jun  9 18:11:15 xunlaichest da0: quirks=0x2<NO_6_BYTE>
Jun  9 18:11:15 xunlaichest ses0 at umass-sim0 bus 0 scbus14 target 0 lun 1
Jun  9 18:11:15 xunlaichest ses0: <WD SES Device 1065> Fixed Enclosure Services SPC-4 SCSI device
Jun  9 18:11:15 xunlaichest ses0: Serial Number 574343344532585435535835
Jun  9 18:11:15 xunlaichest ses0: 400.000MB/s transfers
Jun  9 18:11:15 xunlaichest ses0: SCSI-3 ENC Device
^C
root@xunlaichest[~]# gpart show
=>        34  7814037101  ada0  GPT  (3.6T)
          34      262144     1  ms-reserved  (128M)
      262178        2014        - free -  (1.0M)
      264192  7813771264     2  ms-basic-data  (3.6T)
  7814035456        1679        - free -  (840K)

=>      40  67108784  ada1  GPT  (32G)
        40    532480     1  efi  (260M)
    532520  66551808     2  freebsd-zfs  (32G)
  67084328     24496        - free -  (12M)

=>        40  7814037088  ada2  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        40  7814037088  ada3  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        40  7814037088  ada4  GPT  (3.6T)
          40          88        - free -  (44K)
         128     4194304     1  freebsd-swap  (2.0G)
     4194432  7809842696     2  freebsd-zfs  (3.6T)

=>        34  7814037101  ada5  GPT  (3.6T)
          34      262144     1  ms-reserved  (128M)
      262178        2014        - free -  (1.0M)
      264192  7813771264     2  ms-basic-data  (3.6T)
  7814035456        1679        - free -  (840K)

=>       63  976746177  da0  MBR  (3.6T)
         63        193       - free -  (772K)
        256  976745984    1  ntfs  (3.6T)

root@xunlaichest[~]# ls /dev/da*
/dev/da0    /dev/da0s1
root@xunlaichest[~]# mkdir /mnt/mybook
root@xunlaichest[~]# mount_ntfs /dev/da0s1 /mnt/mybook
Failed to read bootsector (size=0)
Failed to mount '/dev/da0s1': Invalid argument
The device '/dev/da0s1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
root@xunlaichest[~]# kldload fuse
root@xunlaichest[~]# mount_ntfs /dev/da0s1 /mnt/mybook
Failed to read bootsector (size=0)
Failed to mount '/dev/da0s1': Invalid argument
The device '/dev/da0s1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?


--------------- End usb3 output ----------------------

I spent several hours searching this forum, and Google, to find help. What I've tried effectively boils down to the output I've shared here.

Any suggestions would be appreciated. I think I've shared the system info you would need, let me know if I missed something.

Thanks in advance. :)
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
USB3 is not well supported in my experience. It is most likely something you need to connect by way of a SATA or SAS controller.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I'm running libvirtd and qemu, configuring things via virt-manager. My host OS is Pop_OS 18.04, so basically Ubuntu 18.04.

"Absolutely must virtualize FreeNAS!" ... a guide to not completely losing your data.
https://www.ixsystems.com/community...ide-to-not-completely-losing-your-data.12714/

Virtually FreeNAS ... an alternative for those seeking virtualization
https://www.ixsystems.com/community...ative-for-those-seeking-virtualization.26095/

FreeNAS 9.10 on VMware ESXi 6.0 Guide
https://b3n.org/freenas-9-3-on-vmware-esxi-6-0-guide/
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
(I'm new to the forum, would this have been better posted as a gist or pastebin?)
When you have a long formatted text listing, it is best to use code tags to preserve the formatting.
Like this [CODE]your text here[/CODE] which looks like this in your post:

Code:
your text here
 

jerrac

Dabbler
Joined
Jun 9, 2019
Messages
17
Is the lack of usb3 support a FreeBSD thing? Should I just give up on getting it working?

It's an external HDD, so I can't just switch to SATA.

I did read the "Absolutely must virtualize FreeNAS!" ... a guide to not completely losing your data. post. :) I tried to read "Please do not run FreeNAS in production as a Virtual Machine!", but it asks for a login...

Thanks for the tip about the code bbcode. I didn't see the option on the toolbar, so I didn't think to just try it... :\
 
Top