[ltp] My hard drive is read-only!!

Theodore Ts'o linux-thinkpad@linux-thinkpad.org
Thu, 3 Jul 2003 17:18:42 -0400


On Thu, Jul 03, 2003 at 03:44:53PM -0400, Pam Huntley wrote:
> >Anyone know why I can't write to my hard
> >drive!?!  I wonder if it's the drive or the controller.
> 
> That's really odd.
> 
> Does it show up mounted as read-only, or it is supposedly mounting as
> usual?
> 
> Have you run fsck on the partitions?

Note that if the filesystem is corrupted (and it wasn't fixed by
fsck), or if the disk is flaky such that sometimes it looks OK (so it
passes fsck), but sometimes incorrect blocks are returned (such that
kernel sees a filesystem inconsistency), if the kernel discoveres an
inconsistency, the default behaviour is to remount the filesystem
read/only.  You can also set the filesystem (via the tune2fs program)
so that when a filesystem inconsistency is detected, the kernel can
also either reboot immediately (so fsck can fix the problem), or
simply ignore the inconsistency (which is roughly equivalent to
ignoring the first warning signs of a heart attack because it's too
much trouble to visit the emergency room, but some people wanted that
option, so we it give it to them).

						- Ted