Page 1 of 1

guest USB data corruption problem

Posted: 1. Dec 2016, 14:40
by LionSGI
hello!

i have discovered a big problem recently. i run different guests (openSUSE, Win7, Win10) on a Debian system. i managed to use usb mass storage drives (usb pendrive / flashdrive, external usb hdd) on the guests. they show up normally in the guests, You can copy data onto them, then umount them normally. problem is, the data copied onto them gets CORRUPTED every time. i have done some testing on this. i do not have to remove the usb drive physically to get the data corrupted, nor i have to it detach / disable it via the tools/usb menu (uncheck it); i only have to umount it in the guest and then remount it again. it does corrupt data every time. interesting thing is, i did not manage to trash the filesystem on the usb drive yet (i have tried 10 times or so) only the newer copied data seems to be affected...
i have virtualbox-5.1 5.1.10-112026~Debian~wheezy Oracle VM VirtualBox installed with extension pack 5.1.10r112026. i have kernel Linux (none) 3.6.0d111virt #6 SMP Fri Jul 24 13:27:38 CEST 2015 x86_64 GNU/Linux.

i have checked the usb on the host. it works correctly, with no errors. probably it is only a configuration error, but i can not find out, what i am doing wrong. otherwise the guests are working as expected. maybe someone has an idea what is wrong with this setup. i have also tried this very setup on a different hardware (other mainboard) it does the same...
if You have any suggestions, please post them! (i had an older IIRC 4.3 vbox installed that did the same, so i updated to the new one, but no luck...)

thank You in advance!
regards,
Richard

Re: guest USB data corruption problem

Posted: 1. Dec 2016, 15:40
by Perryg
Can't say I have ever seen this but the easy fix is to stop mounting the device in the guest and use shared folders to access the device/s. I seem to remember a discussion on a type of mass storage USB device that was using compression to appear to have more available storage than it really had so maybe there is that to consider.

Re: guest USB data corruption problem

Posted: 1. Dec 2016, 20:29
by LionSGI
Perryg wrote:Can't say I have ever seen this but the easy fix is to stop mounting the device in the guest and use shared folders to access the device/s. I seem to remember a discussion on a type of mass storage USB device that was using compression to appear to have more available storage than it really had so maybe there is that to consider.
thanks for the advice, but unfortunately it is not an option for me (our users would get confused). i have experimented further. i have a 64bit host, the guests were 32bit. i thought it was the cause, so i installed a 64bit guest (Debian8/amd64) but it still does corrupt the data. i did not experience a filesystem damage yet, which i would expect, but did not happen this far... the host does not touch the pendrive (ie. it does not get auto-mounted on the host). it has something to do with the cache. one thing i observed:
if i copy the data onto the usb drive it is OK until i umount it. only thing i can think of is: the cache for the usb device does not get written to the drive for some reason. are there any options in virtualbox that can influence the caching behavior?

maybe i will have time to test it on a 32bit host... i am courious now :D

Re: guest USB data corruption problem

Posted: 1. Dec 2016, 20:36
by Perryg
Like I said I can't remember seeing this one before you and I have been doing this for some time. Perhaps a guest log after you test will give us a clue.

Re: guest USB data corruption problem

Posted: 6. Dec 2016, 19:54
by LionSGI
so, i did some further testing at home, i upgraded to virtualbox-5.1.10. i have a 32bit debian7 with 32bit guest win xp. usb did well, no problems.
i have extension pack installed (same version as virtualbox) on both 64/32bit hosts, but i have no guest additions installed on the guests of the 64bit host. can it cause this kind of usb problem?

thank You!

Re: guest USB data corruption problem

Posted: 6. Dec 2016, 20:12
by mpack
The GAs are not relevant to USB problems. USB is virtual hardware, not a special guest OS driver.