.

dm-3: WRITE SAME failed. Manually zeroing

by 담배맛구마


LVM LV를 마운트하다가 콘솔상에 에러가 떴다.


[ 1046.915965] dm-3: WRITE SAME failed. Manually zeroing.




뭔가 이상하다 싶어 제대로 마운트 되었는지 확인해보니 잘된것 같다.




구글링 끝에 dm이 Device Mapper와 LVM에 관련된 것임을 알았다.


iostat의 결과와 iostat -N의 결과를 비교해보면

※ -N : Display the registered device mapper names for any device mapper devices.


dm-0 / dm-1 / ...들이 LVM LV에 할당되는 것을 확인할 수 있다.


기회되면 Device Mapper에 대해서도 알아봐야 겠다.




즉, [ 1046.915965] dm-3: WRITE SAME failed. Manually zeroing.


dm-3. 그러니까 testvg-testLV1에서 발생한 에러이다.


아래는 WRITE SAME failed. Manually zeroing에 대한 글이다.

http://askubuntu.com/questions/449232/problem-installing-14-04-in-vmplayer


"WRITE SAME failed. Manually zeroing"


If you get reports of "WRITE SAME failed. Manually zeroing" logged to the console, they seem to be caused by this patch to the SCSI disk driver in Linux 3.7+ (and a later patch which enabled WRITE SAME via the disk mapper path from Linux 3.10 onwards), which enables use of the SCSI "WRITE SAME" command (write multiple blocks with the same content -- Linux seems to use it mostly for ensuring blocks contain all zeros).


The patch defaults to using 0xFFFF (65535) blocks for WRITE SAME, except for certain classes of disks (ATA, USB, and Firewire) which are known not to implement the feature (and will use more if SCSI READ SUPPORTED OPERATION CODES reports more). It appears that particularly for certain virtualised disks (eg, KVM, perhaps only older KVM installs -- my host machine still runs Ubuntu 10.04 LTS), this results in assuming WRITE SAME functionality will work even if it is not supported. (Various people have found this problem, in various kernels; it looks like there is a patch to disable it if it fails)


The work around where it is being inappropriately used is to manually set max_write_same_blocks to 0 for the underlying SCSI devices in the /sys file system -- this needs to be done each boot. The affected SCSI devices can be found with: find /sys/devices -name max_write_same_blocks


and something needs to write 0 into the file; on machines with systemd people are using /etc/tmpfiles.d to do that. For Ubuntu 14.04 it looks like the simplest solution is to create a simple script called "disable-write-same", (in /usr/local/sbin), that finds all the max_write_same_blocks files, and echos 0 into them -- then add a call to that to /etc/rc.local. (For good measure run the script immediately, to avoid rebooting.)



반응형

블로그의 정보

정윤상이다.

담배맛구마

활동하기