Receiving "sense key Data Protect" errors when trying to mount EXT3 filesystem from SAN device on Red Hat Enterprise Linux

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux
  • Hitachi OPEN-V SAN
    $ cat proc/scsi/scsi 
    Attached devices:
    Host: scsi3 Channel: 00 Id: 00 Lun: 00
      Vendor: HITACHI  Model: OPEN-V           Rev: 6004
      Type:   Direct-Access                    ANSI SCSI revision: 03
    

Issue

  • Volume group on SAN disk is activated. When I try to mount ext3 filesystem on LVM logical volume, we get the following error in /var/log/messages:
kernel: SCSI error : 3 0 0 0> return code = 0x8000002
kernel: Current sda: sense key Data Protect
kernel: Additional sense: Illegal function (use 20 00, 24 00, or 26 00)
kernel: end_request: I/O error, dev sda, sector 602496
kernel: device-mapper: dm-multipath: Failing path 8:0.
kernel: end_request: I/O error, dev sda, sector 602504
  • LVM mirroring issue. We are not even able to create the PV on the new disks.

Getting below error.

$ pvcreate <device-path>
         : write failed after 0 of 4096 at 4096: Input/output error
 	 Failed to wipe new metadata area at the start of the 
 	 Failed to add metadata area for new physical volume
 	 Failed to setup physical volume 

Error noticed in message file

kernel: sd 3:0:1:17: Unhandled sense code
kernel: sd 3:0:1:17: SCSI error: return code = 0x08100002
kernel: Result: hostbyte=invalid driverbyte=DRIVER_SENSE,SUGGEST_OK
kernel: sdn: Current: sense key: Data Protect
kernel:     Add. Sense: Write protected

Resolution

  • Check Hitachi SAN interface to see if the LUN is write protected or data protected.

Root Cause

Diagnostic Steps

  • Attempt to mount the ext3 filesystem (produces error above).
  • Attempt to write an EXT2/3 Label to the EXT3 filesystem on the Logical Volume (also produces the above area)
  • Consult Hitachi support to see if the SAN LUN is write/data protected.
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.