gostor / gotgt

Simple Golang iSCSI Target framework
Apache License 2.0
261 stars 49 forks source link

data corruption? #119

Open folkertvanheusden opened 1 week ago

folkertvanheusden commented 1 week ago

When I run my simple test-tool which verifies if data written is read ok back later on (also performs unmap-calls), then it warns about wrong data being read back. test-blockdevice.py

e.g.:

./test-blockdevice.py -d /dev/sda -b 4096 -u 75 -T 10 -n 6

gives:

Sector 11 has unexpected data (b'P\x17\x8a\x0f\xd7\x00q\xbf~\xb5\xa0\xffPJy\xfa'... instead of b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'... (and more)

I found that this is caused by UNMAP calls of 4 kB: that gives these problems, 512 bytes unmaps are fine.