Filesystem has become read-only

openSuse v9.3 (Yes, it’s old)
linux 2.6.11.4-21.17-smp i686

At some time after July 28 the entire filesystem has become read-only. It was functional on July 28, the last time I logged into the machine and edited a file. Even as the superuser when I attempt to change, say, the permissions of a file, I get:

> # chmod 777 /opt
chmod: changing permissions of `/opt': Read-only file system

How do I correct this?

> df
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             4.0G  268M  3.5G   7% /
tmpfs                 506M     0  506M   0% /dev/shm
/dev/sdb1              17G  500M   16G   4% /home
/dev/sdb2             8.1G  961M  7.1G  12% /opt
/dev/sda3              17G  2.8G   14G  18% /usr
/dev/sda4              13G  953M   12G   8% /var
/dev/hde1             114G  164M  108G   1% /bkp
//sma-nas-01/pub-data
                      2.8T   97G  2.7T   4% /t
//sma-nas-01/graphics
                      2.8T   97G  2.7T   4% /w

jimoe666 wrote:
> At some time after July 28 the entire filesystem has become read-only.
> It was functional on July 28, the last time I logged into the machine
> and edited a file.

what file did you edit on the last time it worked as expected? did you
edit as root? (what it a system file or a file in /home ?)

did you save a copy of that file as it existed prior to your edit?

can you fall back to that pre-edit state?

why would you want to chmod 777 /opt anyway? opt is owned by root and
should stay owned by root and there is no valid reason i can think
of to mess up its permissions to allow normal uses in to muck up the
works…

is this v9.3 machine a server?

running without X?

are you directly accessing hardware through a keyboard connected to
the server, or is there a VM or Win-machine involved…

try this:

-open a terminal
-cd to /opt and issue


ls -hal

and copy paste it back to here…

and, cd to the directory/folder where exists the file you edited on 28
july and issue the same code, and copy/paste it also…

then, finally do this


cat /etc/fstab

free advice: i’ve used Linux since 1998 and can’t remember if i ever
did a chmod 777 on any folder, but i don’t think so…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Please the output of

cat /etc/fstab

and

mount

And please look through

dmesg

to see if there ar any messages about malking file systems read only.
Is this just one file system, or all of them?

And what are the access bits on /opt now?

ls -ld /opt

It was a disk drive gone bad.

All my efforts to restore the disk to some usable state were in vain (fsck, system repair, rescue disk, …). There were a large number of error messages about being unable to write to the disk. fsck said much the same thing: non-writable. mount was steadfastly at non-mountable, not even read-only.

I ended by replacing the disk drive and re-installing the OS.

Nothing is eternal, not even diks :wink:

I hope you have a proper backup (as you should).

jimoe666 wrote:
> I ended by replacing the disk drive and re-installing the OS.

unfortunately it seems disks just don’t last like they used to…

i now always buy only those claimed as enterprise ready (or some such)
and with a five year warranty…

and, i plan to replace them before they have lived that long…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

I second that - to quote a clever man: “777, the REAL number of the beast.” One should just not do that.

On 2010-08-02 15:03, DenverD wrote:
> jimoe666 wrote:
>> I ended by replacing the disk drive and re-installing the OS.
>
> unfortunately it seems disks just don’t last like they used to…

A machine with an /opt partition running SuSE 9.3 (no openSUSE at that time)? That’s probably a
server. I guess it has been up many thousands of hours, so the disk is not a bad one.

jimoe666:

You should run SMART tests periodically on all your disks; as the 9.3 is old, you should get a new
version as source and recompile, to get the full functionality of smart[ctl|d]


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Carlos E. R. wrote:
> A machine with an /opt partition running SuSE 9.3 (no openSUSE at
> that time)? That’s probably a server. I guess it has been up many
> thousands of hours, so the disk is not a bad one.

that was my guess too…

and, i guess when ‘suddenly’ (after a file edit) the disk was read
only the Admin tried a MS-Standard Fix (a reboot) and THEN is when the
used-to-be-constantly-spinning-for-thousands-of-hours drive decided to
not restart…

you have seen that too, right?


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

On 2010-08-03 10:04, DenverD wrote:
> Carlos E. R. wrote:
>> A machine with an /opt partition running SuSE 9.3 (no openSUSE at
>> that time)? That’s probably a server. I guess it has been up many
>> thousands of hours, so the disk is not a bad one.
>
> that was my guess too…
>
> and, i guess when ‘suddenly’ (after a file edit) the disk was read
> only the Admin tried a MS-Standard Fix (a reboot) and THEN is when the
> used-to-be-constantly-spinning-for-thousands-of-hours drive decided to
> not restart…
>
> you have seen that too, right?

Oh, yes. :slight_smile:

It runs an fsck, which fails, then… gosh.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))