I have never had any SAS drive until now and have recently purchased an Fusion-MPT 2 controller:

04:00.0 SCSI storage controller: Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)

Along with a Seagate ST10000NM002G 10TB SAS drive. I've plugged everything in and the good news is the mp3sas module is detecting the controller and the disk is also detected.

The bad news is that the disk is recognized as write-protected:

[   11.078668] sd 5:0:0:0: [sda] 19532873728 512-byte logical blocks: (10.0 TB/9.10 TiB)
[   11.082640] sd 5:0:0:0: [sda] 4096-byte physical blocks
[   11.086516] sd 5:0:0:0: [sda] Write Protect is on
[   11.091759] sd 5:0:0:0: [sda] Mode Sense: df 00 90 08
[   11.093572] sd 5:0:0:0: [sda] Write cache: disabled, read cache: enabled, supports DPO and FUA
[   11.164638] sd 5:0:0:0: [sda] Attached SCSI disk

Which means I can read from it just fine, but not write anything to the block device. I've tried resetting it via sysfs:

# cat /sys/devices/pci0000:00/0000:00:03.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/host5/port-5:0/end_device-5:0/target5:0:0/5:0:0:0/block/sda/ro

# echo 0 >/sys/devices/pci0000:00/0000:00:03.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/host5/port-5:0/end_device-5:0/target5:0:0/5:0:0:0/block/sda/ro
bash: /sys/devices/pci0000:00/0000:00:03.1/0000:02:00.0/0000:03:00.0/0000:04:00.0/host5/port-5:0/end_device-5:0/target5:0:0/5:0:0:0/block/sda/ro: Permission denied

I've also read that apparently for SAS drives there's some "formatting" that can be done with sg-utils, specificially the sg_format tool, but:

# sg_format --format /dev/sda
error opening device file: /dev/sda: Read-only file system
sg_format failed: Read-only file system

This also fails because the disk is write-protected. I've also tried hdparm:

# hdparm -I /dev/sda


ATA device, with non-removable media
    Likely used: 1
    Logical     max current
    cylinders   0   0
    heads       0   0
    sectors/track   0   0
    Logical/Physical Sector size:           512 bytes
    device size with M = 1024*1024:           0 MBytes
    device size with M = 1000*1000:           0 MBytes 
    cache/buffer size  = unknown
    IORDY not likely
    Cannot perform double-word IO
    R/W multiple sector transfer: not supported
    DMA: not supported
    PIO: pio0 

# hdparm -r /dev/sda

 readonly      =  1 (on)

# hdparm -r0 /dev/sda

 setting readonly to 0 (off)
 readonly      =  1 (on)

# hdparm -r /dev/sda

 readonly      =  1 (on)

I don't know if the disk is bad, the controller is bad or if I'm doing something wrong. What can I do to get the disk running in R/W mode?

  • hdparm won't tell you much because it's an ATA tool, while SAS is SCSI. (The controller should support SATA though, so I'm curious about what happens if you plug in a random SATA disk to it; does that also show up as read-only?) Commented Apr 18 at 4:47


You must log in to answer this question.

Browse other questions tagged .