retry mounting with ro when rw fails
aduane at juniper.net
Fri Apr 8 16:47:20 UTC 2011
For SCSI-attached disks, yes. But other hardware has write-protect sensing (SD cards, CD-roms, our platform). So if you can do that, you should
Cleaning up after a failed write is a real problem, one that I needed to avoid.
From: Andriy Gapon [mailto:avg at FreeBSD.org]
Sent: Friday, April 08, 2011 11:23 AM
To: Andrew Duane
Cc: Bruce Evans; freebsd-fs at freebsd.org; FreeBSD Hackers; freebsd-scsi at FreeBSD.org
Subject: Re: retry mounting with ro when rw fails
on 08/04/2011 15:36 Andrew Duane said the following:
> What I was hoping to do was design a better mechanism for passing that R/O
> detection from the device to the filesystem code. Our implementation uses a
> platform sysctl that checks the incoming device name against some hardware or
> software settings. Ick. I don't know enough about device/GEOM calls to do it
> better though.
I am actually not aware of any way to inquiry write-protection status from
hardware. There are distinct SCSI sense codes for that, but you get them only
after a failed write attempt.
But there are many things that I don't know about...
More information about the freebsd-hackers