tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
read(2) failed: Read-only file system
So I have a dying disk (WD20EARX) in a USB enclosure, and I tried to
do some random reads against the raw device:
read I/O failed, offset 363065167872: 30 (Read-only file system)
I guess I'm a little surprised by this error?
Nor does read(2) list EROFS as a possible return, which seems sensible.
Looking at the code, I'm guessing the drive is returning
SKEY_DATA_PROTECT for some reason, so this is likely not a bug, but
interesting behaviour.
Indeed:
Jun 27 16:19:40 slave /netbsd: [ 3710565.0174648] sd0(umass0:0:0:0): Check Condition on CDB: 0x28 00 2a 44 2f 68 00 00 08 00
Jun 27 16:19:40 slave /netbsd: [ 3710565.0174648] SENSE KEY: Write Protected
Jun 27 16:19:40 slave /netbsd: [ 3710565.0174648] ASC/ASCQ: Logical Unit Access Not Authorized
Jun 27 16:19:40 slave /netbsd: [ 3710565.0174648] sd0d: error reading fsbn 709111656 of 709111656-709111663 (sd0 bn 709111656; cn 346245 tn 59 sn 8)
So, yeah. This is such an edge case it's probably not even worth
documenting beyond this email?
NetBSD 9.2, amd64, fwiw.
--
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
Home |
Main Index |
Thread Index |
Old Index