I/O errors after importing raw eSATA disks with a ZFS pool to Solaris guest

Discussions about using Solaris guests in VirtualBox.
Post Reply
Rob_Thurlow
Posts: 3
Joined: 12. Jul 2020, 20:18

I/O errors after importing raw eSATA disks with a ZFS pool to Solaris guest

Post by Rob_Thurlow »

Hi folks,

I have a 5-bay eSATA box (a Sans Digital TR5M-BP) with an existing ZFS pool that's been run from an old homebrew AMD Phenom II machine running Solaris 11.3. I would like to access the ZFS pool from a Solaris VBox instance and retire the old box.

I have a Windows 10 host (Dell XPS 8930) with a Mediasonic ProBox Card HP1-SS3 eSATA card and the ASMedia 3.3.3 eSATA driver. It appears to work, but it's not super trustworthy - 3.3.2 rendered Windows 10 unbootable.

I created raw disk vmdks with a series of commands like this (run as admin, and I have to run VBox as admin as well):

VBoxManage internalcommands createrawvmdk -filename "C:\Users\rthur\VirtualBox VMs\sol-11_4-vbox\z1.vmdk" -rawdisk \\.\PhysicalDrive2

Then I added a SATA controller and added these vmdks to the controller in my Solaris 11.4 Vbox config. 'format' saw the disks, and 'zpool import' saw the pool. And 'zpool import <pool>' worked :-)

Then I got cocky. I ran a 'zpool scrub', which worked for a few minutes, but then hit an I/O error (sorry, details lost) - Windows had detected a problem, and the Solaris guest lost access to three of the five drives. It looked dire for a while there. I had to power down the Solaris Vbox and reboot Windows 10 to get the drives back online, and then found that the guest had lost a drive because Windows had renumbered the eSATA drives. I edited the five vmdks to use the correct numbers, and I am back to having a full pool again.

Having I/O errors makes me nervous, and I am not sure how to track this down. Windows seems to have raised the alarm - what can I look at on Windows to find out more? I can imagine there could be issues in the eSATA card+driver, and might try to find a Silicon Image-based card which might be more trustworthy. But I also wonder if I could improve things by setting caching policy for those drives so that Windows is further out of the way for the eSATA drives. Does anyone know of anything in that direction that might help? Finally, I have a USB 3.0 4-bay box which I am thinking of deploying a new pool on - any thoughts on whether that might be more successful?

Thanks,
Rob T
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: I/O errors after importing raw eSATA disks with a ZFS pool to Solaris guest

Post by stes »

I have no solution but it's an interesting problem to read about :D

The procedure that you seem to have followed (with success partly) is:

9.7.1. Using a Raw Host Hard Disk From a Guest

Perhaps in the Windows host support forum (because your VirtualBox host is Windows) they know more about this, what can be done at the Windows level (event log or device management); but from reading your post, you already seem to have tried out various driver updates and tests with the physical hardware.

Regarding your question as to whether importing a external USB disk works ...

I've done an attempt a while ago to try to mount a USB physical disk on a Solaris guest and it failed for me,
but the VirtualBox host was Solaris for me.

Also maybe I didn't try enough, there's differences perhaps also for USB 2 and 3 (uhci/ehci versus xhci drivers in Solaris).
Last edited by mpack on 14. Jul 2020, 14:48, edited 1 time in total.
Reason: Correct URL.
stes
Posts: 154
Joined: 28. Apr 2018, 11:07

Re: I/O errors after importing raw eSATA disks with a ZFS pool to Solaris guest

Post by stes »

Instead of raw disk access on the Solaris guest, which is an interesting project, you could perhaps also try to use ZFS on Windows:

https://openzfs.org/wiki/FAQ

Once you have the ZFS on Windows 10 then you could provide the data to the Solaris guest using the builtin VirtualBoxFS (vboxsf shared folder using the VBoxGuestAdditions on the Solaris guest).

However that depends of course on the Windows part being able to access the ZFS data, which you already indicated in your post is not very reliable (according to what you wrote about the driver issue on Windows for the eSATA disks).
Rob_Thurlow
Posts: 3
Joined: 12. Jul 2020, 20:18

Re: I/O errors after importing raw eSATA disks with a ZFS pool to Solaris guest

Post by Rob_Thurlow »

I was wondering if I needed to take this to the Windows hosts section - thanks for the encouragement to do so.

OpenZFS is cool and I am aware of it; unclear it's going to work well under Windows for awhile, per the FAQ. My pool version is past 28, so I would have to recreate the pool - but I am about to do that with a USB3 pool.

I did find this page on a search: https://superuser.com/questions/289189/ ... in-windows

I am amused by how relevant to my issue it seems to be:

"ZFS in virtual machine can work just fine if follow one simple rule never ever lie to ZFS. ZFS goes to great length to keep your data from getting corrupted (checksums, copy-on-write, dittoblocks, mirrors or raid-z, etc) so you should do everything in your power to let ZFS directly access your disks. All the horror stories of virtualized ZFS issues come from some level of buffered IO from virtualization software buffers, disk controller cache or even windows with writethrough cache if you're dumb enough to use virtual disks instead of whole raw disks."

BTW, I was able to pass through a USB3 external BluRay burner to the guest, and was able to mount a UDFS filesystem from a data disk. So that makes me think that the passthru will work, though again, buffering in Windows or VBox may be the same as I'm seeing with eSATA.

Thanks,
Rob T
Post Reply