1

With Debian 8 and VMware 6 I am seeing these logged quite a bit: WRITE SAME failed. Manually zeroing messages.

Is this something to be concerned about? From searches, it seems its related to the 3.9 linux kernel released a few months ago.

However, is this a bug? Will there be a fix for it?

user20877623
  • 11
  • 1
  • 2

1 Answers1

4

It's just the kernel saying that it experimentally tried to issue a "WRITE SAME" SCSI command to speed up zeroing data and the block layer rejected it (usually because the disk doesn't support it) - most disks don't support all possible disk commands as many are optional (at the time for writing when VMware uses VMDK's it doesn't support WRITE SAME).

Basically WRITE SAME writes the same block of data (in this case 0x00) to X number of sectors instead of issuing the commands individually (which is what it said it's falling back to doing). It's just a performance thing and only specific workloads regularly zero large amounts of data.

The message is nothing to be concerned about as it is only informational and only printed once per device. Further, the "WRITE SAME failed. Manually zeroing." message was eventually removed in the 4.0 kernel.

In summary: it's not a bug so there's was nothing to fix and the message has been removed in recent kernels.

Anon
  • 3,694
  • 22
  • 29
Bratchley
  • 16,684
  • 13
  • 64
  • 103
  • Interesting do you have a more defined idea why this is done, and in what configuration? Thin disks allocation for instance? – Rui F Ribeiro Nov 19 '15 at 17:28
  • The vmware configuration probably doesn't matter, vmware probably just doesn't support the command at all. As for why, I don't know without digging into it. Depends on what was happening on the system that made it want to do that. You can disable it ever trying by modifying `max_write_same_blocks` for the HDD in question's entry in `/sys` – Bratchley Nov 20 '15 at 01:32
  • @RuiFRibeiro: If it works it can be MUCH faster to zero big amounts of the disk. However bugs in things like RAID/disk firmware mean that support for this command is advertised when it can't actually be handled. – Anon Mar 25 '16 at 12:29
  • 1
    @RuiFRibeiro: In order for things to work, every part of the storage stack (drivers, RAID controllers, disks etc) must be able to handle the command sent down. If the driver advertises "I can do WRITE SAME!" but it turns out after it sends the command to the "disk" the equivalent command fails (e.g. because the disk lied to you about its capabilities) you have to use the failure has a prompt that WRITE SAME doesn't work and that you should do things the old fashioned way. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1371591 elaborates a bit more on the VMware case. – Anon Mar 25 '16 at 12:48