/proc/mount ro

Asked by Afonso Sá

Dear all,

my ubuntu 9.10 is mounting the root filesystem as read only.
already tried some options found on the forums like fsck, remounts, etc, but no luck...

for what I could find, my problem is is /proc/mounts:

root@WKS00335:~# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
udev /dev tmpfs rw,relatime,mode=755 0 0
/dev/mapper/WKS00355-root / ro,relatime,barrier=1,data=ordered 0 0
none /sys/kernel/security securityfs rw,relatime 0 0

my root is defined as ro

for etc/fstab, I've got:

root@WKS00335:~# cat /etc/fstab
# /etc/fstab: static....
#comments#
#<file system>...
proc /proc proc defaults 0 0
/dev/mapper/WKS00355-root / ext4 errors=remount-ro 0 1
#boot was on /dev/sda5 during installation
UUID=9254b90c-c665-4dc1-8e1a-7b2e6a493ca4 /boot ext2 defaults 0 2
/dev/mapper/WKS00355-swap_1 none swap sw 0 0
/dev/sdc0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

the question is, how can I change /proc/mounts so that /dev/mapper/WKS00355-root / is rw instead of ro?

Best regards,
Afonso Sá

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Afonso Sá
Solved:
Last query:
Last reply:
Revision history for this message
Warren Hill (warren-hill) said :
#1

Ubuntu 9.10 is no longer supported. Why such an old release?

I strongly suggest you backup then upgrade. I would recommend 12.04LTS

Revision history for this message
Afonso Sá (afonso-sa) said :
#2

This is an old wiki user for historical purpose.
The guys who installed it are not on the company anymore and we haven't felt the need to upgrade it.

Is there no way you gyus can give me some tip on how to solve this?

Revision history for this message
Warren Hill (warren-hill) said :
#3

Open a terminal (CTRL+ALT+T) Enter the following command

---------------------------------------------
sudo mount -o rw,remount /
---------------------------------------------

Does it now work or do you get errors?

this line in fstab

/dev/mapper/WKS00355-root / ext4 errors=remount-ro 0 1

says if the file system has problems make it read only. It may be that the drive is on its way out

this may help you diagnose and fix the problems

http://manpages.ubuntu.com/manpages/karmic/man8/fsck.ext2.8.html
http://justcheckingonall.wordpress.com/2010/07/18/howto-repair-broken-ext4-partitions/
http://askubuntu.com/questions/14740/force-fsck-ext4-on-reboot-but-really-forceful
http://linuxexpresso.wordpress.com/2010/03/31/repair-a-broken-ext4-superblock-in-ubuntu/

Revision history for this message
Manfred Hampl (m-hampl) said :
#4

/proc/mount is only an interface to display the mount status of your devices; changes have to be done elsewhere.
File systems get mounted according to the information in /etc/fstab
From your output I see that /etc/fstab for /dev/mapper/WKS00355-root does not specify ro, so it defaults to rw, and it has errors=remount-ro
/proc/mount shows for /dev/mapper/WKS00355-root that it is ro.

So I conclude that there must have been some event that caused your root file sytem to be remounted readonly.

Is there anything in dmesg and/or syslog that gives a hint? (I am aware that as soon as the device is ro, syslog cannot be written any more, but maybe the last message that has managed its way to disk shows the reason.)

Can you remount your root file system readwrite with a command like
sudo mount -o remount,rw /

Revision history for this message
Afonso Sá (afonso-sa) said :
#5

Hi Manfred,

on dmesg I cannot fing any error message related to this.
On syslog, I only have this kind of messages:
Nov 20 06:38:58 WKS00335 nagios3: Error: Unable to create temp file for writing status data!
Nov 20 06:39:01 WKS00335 CRON[26661]: (root) CMD ( [ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -n 200 -r -0 rm)
Nov 20 06:40:01 WKS00335 CRON[26679]: (munin) CMD (if [ -x /usr/bin/munin-cron ]; then /usr/bin/munin-cron; fi)

thousands of them :(

At boot, I can see this info:
exec: 5: mountall: not found
init: mountall main process (429) terminated with status 2
File system check failed.
A maintenance shell will now be started.
CONTROL-D will terminate this shell and re-try.

sudo mount -o remount,rw /
the command returns no error

Revision history for this message
Afonso Sá (afonso-sa) said :
#6

Hi Manfred,

the solution was on my last post:
exec: 5: mountall: not found

I was missing this!!!
Booted with live CD and copied mountall from another host and after 2 reboots, it's working!