How to check if a drive is passed through

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
LS,

As I have learned FreeNAS can be virtualized reading the following blog post:

I'd like to try it as my current trying out hardware is a bit overkill for a 3TB 3 way mirror.

Are there any commands I can use in the shell of the FreeNAS VM to make sure the drives are not virtual drives but are the actual hardware passed through?

Kind regards
 

artlessknave

Wizard
Joined
Oct 29, 2016
Messages
1,506
not really. if the drives are hardware passed thru you will see them as regular drives, and freenas will report the controller directly. if they are VM drives you would literally have to create the VM drives when creating the VM, so you would already know that they are virtual drives. the steps for either of these states are dramatically different.

a ryzen 9 is...more than a bit overkill.
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
Also, a way to verify if FreeNAS has direct access to a drive is to check the
smartclt output for a specific drive.
For example something like smartclt -A /dev/da2 should give you all the SMART attributes from your drive. If the drive is not passed through properly then you won't see the specific attributes.


Examples of output for non passed through drives:
Code:
root@192.168.0.22[~]# smartctl -A /dev/da0
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.2-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF READ SMART DATA SECTION ===

The list of attributes is empty.

More details can be shown with -x:
Code:
root@192.168.0.22[~]#smartctl -x /dev/da0
smartctl 6.6 2017-11-05 r4594 [FreeBSD 11.2-STABLE amd64] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Vendor:               VMware,
Product:              VMware Virtual S
Revision:             1.0
User Capacity:        4,294,967,296 bytes [4.29 GB]
Logical block size:   512 bytes
Rotation Rate:        Solid State Device
Device type:          disk
Local Time is:        Sat Feb 15 10:47:46 2020 CET
SMART support is:     Unavailable - device lacks SMART capability.
Read Cache is:        Unavailable
Writeback Cache is:   Unavailable

Here the Vendor and Product clearly indicate a VM drive.
Furthermore, the information SMART support is: Unavailable is also a sign that the drive is not passed through.


As @artlessknave said, you shoud see them as regular drives that means they should also appear in the boot messages dmesg.
In my case (drives are not passed through):

Code:
da0: <VMware, VMware Virtual S 1.0> Fixed Direct Access SCSI-2 device
 

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
Thx guys,

Now the challenge is to actually get a VM with FreeNAS up and running.

Kind regards
 

Pitfrr

Wizard
Joined
Feb 10, 2014
Messages
1,531
To get FreeNAS run in a VM, you can have a look at this post.

It was a good reference for me and the set-up I have.
The main points to considered, I'd say:
  • Using VMware (more widely used in the forum therefore more resources)
  • Passthrough the controller
  • Reserve (or lock) the memory
I didn't encounter any problem or difficulty setting it up, it worked straight away.
I already had experience with FreeNAS bare metal though and I stayed with the old version 9.10.x... :smile:
My advice would be to set it up and play a bit with it (with no "critical" data) before putting it in production.

Have fun!
 

diversity

Contributor
Joined
Dec 4, 2018
Messages
128
I am looking to boot a freenas vm with a passmark memtest86 pro rc build usb (if at all possible)
if so, should I only be confident if the ecc error injection results in a reported correction?
or simply just go ahead, hoping the the mem errors are taken care of by the host?
 
Top