Hi Dustin,

    Excellent questions.  I should have included that information.

1) Can you reproduce this on an Ubuntu Jaunty host?
     I have not tried Jaunty 9.04 beta.  Sorry.  What version of KVM and QEMU 
are provided?  I checked the main KVM changelog and I don't see anything about 
it.  I thought I read something about a rewrite of the VFAT code but I cannot 
find that in the Changelog for the life of me.  Off topic, is there a way to 
peek at other APT repositories to, say, get the Changelog of a package in an 
upcoming release?
    If you have good reason to believe this is likely to be resolved in Jaunty, 
let me know.  I'll try to move up my upgrade to 9.04 and test for you.  My test 
machine doesn't have the horsepower/RAM for VMs.

2) Does the problem only happen when copying data guest->host? What about 
host->guest?
    Yes.  I have only detected corruption when exporting data from the guest 
system to the host (i.e. writes).  I have read many small files without any 
trouble and more convenient than Samba...
    Well, you'll be interested in this new behavior.  I thought I would just 
test a big file for you really quick.  So, I put a new 150MB ISO image in the 
VFAT directory and started KVM.  But, this time, I received this error:

    kvm: block-vvfat.c:96: array_get: Assertion `index < array->next'
failed.

I created a new directory, moved the ISO image there, and updated the -drive 
parameter to point to the new directory.  KVM started correctly.  I performed 
the test copy, importing the ISO image file without corruption.  I believe this 
problem is isolated to large file exports (i.e. VFAT writes).
    Now, I'm lost regarding that error.  That sounds like the directory file on 
the host is getting corrupted, in addition to filenames and file data.  But, I 
don't see any bogus data in the directory file, although I don't really know 
what or how to look for that.  The other option is that there is some 
restriction on the Virtual FAT device that I don't understand.  For example, 
the last time I used this particular VM, WindowsXP was constantly annoying me 
about the VFAT drive being full and that I should run Disk Cleanup on it.  
WindowsXP sees the VFAT drive as having a total capacity of 512MB and there 
was, at that time, more than 512MB used by files in the VFAT directory and its 
subdirectories on the host.  However, the drive was nearly empty when I first 
noticed this problem and my tests were completed before the drive was "full."  
It filled up as I kept different versions of the same ISO file for comparison.

3) What protocol are you using to do the copy? scp? ftp? rsync? samba? nfs? 
Something else?
    The copying that produced the corruption was Windows Explorer copy/paste or 
drag/drop.  I'm sorry I didn't try copy.  SFTP network-based export worked 
perfectly.  Mounting the NTFS filesystem within the VM image (after converting 
to raw with qemu-img convert) and using cp from the host also worked.  I assume 
all TCP/IP or Network based transfers are safe.

4) Also, what type of guest disk? qcow? qcow2?
    Originally, I was using qcow2 format.  But, before I thought of SFTP (doh!) 
I decided to try to loopback mount the VM disk image, which required converting 
it to a raw disk image.  Corruption was experienced before and after the 
conversion.  
    Also, to be honest, so my most careful tests were performed using qemu (to 
remove some of the variables).  But, I originally noticed this problem using 
kvm.

5) And what's the command line you're using to launch this?
    I use the same command line parameters for QEMU and KVM.  (I hope that is 
correct usage.)  Here are all my parameters:
-name "WinXP" -M "pc" -smp "1" -m "512" -drive 
"file=image.raw,if=ide,index=0,media=disk" -drive 
"file=fat:rw:/home/pdestefa/tmp/qemuVVFAT,if=ide,index=3,media=disk" -net 
"nic,vlan=0" -net "user,vlan=0,hostname=winxp" -localtime -usb -S

Again, I hope this is helpful.  Please let me know if there is anything
I can do.

-- 
Corruption of File Data/Filename w/ Virtual FAT (VFAT)
https://bugs.launchpad.net/bugs/356808
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to