Hyper-V Disk not showing up in pool, expected behavior?

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
So I just set up a 8x8GB z2 Pool and it is fast. I was concerned that it wasn't actually z2 because it is very fast with writes. I am copying 3 other 8GB disks to it at near full speed. So I removed two disks from Hyper-V and the pool went offline. When I looked at the pool I was only seeing 5 disks but I only remove 2 of 8 so I should have a working zpool of 6 disks. On my Hyper-V SCSCI controller I saw the missing disk was #8 and the removed disks were #6 and #7. So I moved disk #8 to to #6 on my SCSI controller and the disk came back online and so did my zpool. Is this expected behavior? Does TrueNAS stop looking for disks when it finds one SCSCI port not in use? I am guessing this is something that should be resolved in a future update, correct?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So I removed two disks from Hyper-V
I'm not sure how this relates to your situation... are you running TrueNAS on top of Hvper-V? If that's true, how are you passing the disks through? and have you taken this into account? : https://www.truenas.com/community/t...ide-to-not-completely-losing-your-data.12714/

When I looked at the pool I was only seeing 5 disks but I only remove 2 of 8 so I should have a working zpool of 6 disks.
Could you share zpool status -v and zpool list -v to help us see what you're talking about?
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
I'm not sure how this relates to your situation... are you running TrueNAS on top of Hvper-V? If that's true, how are you passing the disks through? and have you taken this into account? : https://www.truenas.com/community/t...ide-to-not-completely-losing-your-data.12714/

Could you share zpool status -v and zpool list -v to help us see what you're talking about?

Yes, the disks are attached to Hyper-V as physical disks. Hyper-V has a SCSI controller and you can add physical disks to it, I am not using virtual disks. It might be Hyper-V dropping the disks, I am not sure. I would need to test in another OS to find out if it is the same behavior. Everything is in the zpool now so no point in showing it, just that the #8 controller disk was missing when I removed #6 and #7 and came back when I moved the #8 disk up in the controller list.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Yes, the disks are attached to Hyper-V as physical disks. Hyper-V has a SCSI controller and you can add physical disks to it, I am not using virtual disks.
Just be aware that it's not the same as adding the disk controller to TrueNAS and would be considered as not production safe by this forum. Strange/unexpected/bad behavior is therefore no surprise to us.

In order to virtualize in a way that would be considered safe, you need to pass an entire physical controller into the VM and use only disks attached to it (except for the OS disk, which could be virtual if needed).
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Is this expected behavior? Does TrueNAS stop looking for disks when it finds one SCSCI port not in use?
You are using a virtualization layer. It is NOT how TrueNAS behaves on real hardware. I have two systems at work where I am going through replacing old drives with new drives (physical servers) and pulling drives from a pool does not take the pool offline. If you are using swap, it can cause some unexpected behavior, but that is another question.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Yes, the disks are attached to Hyper-V as physical disks. Hyper-V has a SCSI controller and you can add physical disks to it, I am not using virtual disks. It might be Hyper-V dropping the disks, I am not sure. I would need to test in another OS to find out if it is the same behavior. Everything is in the zpool now so no point in showing it, just that the #8 controller disk was missing when I removed #6 and #7 and came back when I moved the #8 disk up in the controller list.
This is a dangerous method of configuring FreeNAS / TrueNAS and you stand a good chance of loosing any data you put in the ZFS pool by building it this way.

Is this for testing or something you plan to use operationally?

If you can give us some information to go on, we can make some suggestions.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
You are using a virtualization layer. It is NOT how TrueNAS behaves on real hardware. I have two systems at work where I am going through replacing old drives with new drives (physical servers) and pulling drives from a pool does not take the pool offline. If you are using swap, it can cause some unexpected behavior, but that is another question.
Yeah, I need to look at Hyper-V, it maybe be happening there and not in TrueNAS.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
This is a dangerous method of configuring FreeNAS / TrueNAS and you stand a good chance of loosing any data you put in the ZFS pool by building it this way.

Is this for testing or something you plan to use operationally?

If you can give us some information to go on, we can make some suggestions.
Why is this dangerous? TrueNAS should have almost native access to the drives.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
Just be aware that it's not the same as adding the disk controller to TrueNAS and would be considered as not production safe by this forum. Strange/unexpected/bad behavior is therefore no surprise to us.

In order to virtualize in a way that would be considered safe, you need to pass an entire physical controller into the VM and use only disks attached to it (except for the OS disk, which could be virtual if needed).
Yes, my OS and a LOG drive are virtualized, vhdx.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
No, I don't
The problem is with "almost". That's why I marked that word bold and red. Anything but direct native disk access is a road to desaster.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
The problem is with "almost". That's why I marked that word bold and red. Anything but direct native disk access is a road to desaster.
Even a controller would be almost as well, you have to attach something to the VM, you can't get rid of that layer without using an entire PC which I am not willing to do.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
An entire controller passed-through via PCIe gives you direct access to the controller and the drives which is what is needed if your virtualise.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
The basic principle is, FreeNAS / TrueNAS (lets just say 'the OS') needs direct access to the disk at the controller level, so the general guidance is to pass the entire controller through to the VM. Here are the recommendations for ESXi, which should be taken as true for any virtualization layer.

Some useful guidance to review:



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
Then passing the drive should give me direct access to the drive, correct?
No, and that is particularly true when talking about removing or replacing a drive and possibly pulling SMART data from the drive for health monitoring.
 

tony95

Contributor
Joined
Jan 2, 2021
Messages
117
No, and that is particularly true when talking about removing or replacing a drive and possibly pulling SMART data from the drive for health monitoring.
So, I am losing the smart status. Didn't realize that. I guess I can monitor it at the host level or reconfigure with disk controller passthrough. I am not going to buy new hardware, so can a motherboard controller be passed through? I wouldn't think so since the host needs it. If that is the case, then I will certainly monitor the disks outside of TrueNAS.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I would suggest that you find a way to pass a whole controller to the NAS OS. If you don't, I think you are setting yourself up for failure.

We have seen it happen before. It isn't a matter of if it will happen, just when...
 
Top