There is no read-only from Santa to naughty kids in this year

George Shuklin
OpsOps
Published in
1 min readFeb 20, 2019

I’ve just found that I can’t force a device under Linux to become read-only.

hdparm -r 1 /dev/sd*

is silently ignored, and there are no other ways to do it. Nothing in sg3, nothing in /sys/block/sd, nothing in /proc/scsi/scsi.

It’s odd, but you can’t force a device to become a readonly.

You can forcefully delete it, freeze all operations, but you can’t make it readonly.

I was a naughty boy and Santa decided that I don’t deserve a good testing framework for SSDs dying in RO state in this year…

/sad

--

--

George Shuklin
OpsOps

I work at Servers.com, most of my stories are about Ansible, Ceph, Python, Openstack and Linux. My hobby is Rust.