1

My filesystem is read-only for several days. Searching for somesthing on my /var/log/messages and found this.

****EMITTING CHANGED for /sys/devices/pci0000:00/0000:00:11/host0/target0:0:0/0:0:0:0/block/sda
****Refreshing ATA SMART data for /sys/devices/pci0000:00/0000:00:11/host0/target0:0:0/0:0:0:0/block/sda
helper(pid 3495):launched job udisks-helper-ata-smart-collect on /dev/sda
helper(pid 3495):completed with exit code 0

I this a health test:

# smartctl -d ata -H /dev/sda

and get the follow output:

smartctl 5.42 2011-10-20 r3458 [x86_64-linux-3.1.0-1.2-default] (SUSE RPM)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

what can I do to prevent my filesystem to get readonly?

4
  • Ok it looks like my filesystem is useless... will try to find a solution but if somebody have something to say, any idea it could be nice! Commented Aug 24, 2012 at 15:59
  • 1
    Check dmesg (run that) to see if anything is there. Commented Aug 24, 2012 at 17:14
  • 1
    Also, please tell us which filesystem, and also post its /etc/fstab entry. Commented Aug 24, 2012 at 17:17
  • Made a mistake with badblocks... will continue it later =D Commented Aug 27, 2012 at 11:15

2 Answers 2

4

It could still be a file system of disk failure. Take a look at dmesg for more clues. If you have rebooted - does it come up clean or does it warn you about filesystem problems?

You should be able to remount the file system read-write using:

mount -o remount,rw /

However, it would be a good idea to try to figure out what exactly caused it to mount read-only first.

It is possible to hit a keyboard shortcut that would remount the root filesystem read-only. Usually its Alt + SysRq + U.

2
  • I know that but mount -o remount,rw / doesn't do anything. Commented Aug 24, 2012 at 15:06
  • my disk was broken after all forgot to grant an answer thanks... Commented Sep 25, 2012 at 0:25
4

Run a file system check (AKA "check disk") on the disk fsck /dev/sda. If the disk check report unrepairable sections, that could be why the system is mounting the disk read only. If the disk can be repaired, boot with a Live CD or Rescue Disk for your system and un fsck -f on the disk to repair it.

7
  • Ok fsck.reiserfs -f /dev/sda gave me this output the reiserfs superblock cannot be found on /dev/sda. Failed to open the filesystem. Commented Aug 24, 2012 at 15:11
  • @Tim: No, he wants to fsck the partition, not the whole disk. So /dev/sda1 or whatever. Commented Aug 24, 2012 at 17:15
  • but also, you're having him run a fsck on a mounted partition. Generally not the best of ideas... Commented Aug 24, 2012 at 17:22
  • @Solo: So it's reiserfs? Migrate to another fs. Commented Aug 26, 2012 at 20:44
  • @derobert I'm have not run a fsck on a mounted partition; I'm used a liveCD to do that. Commented Aug 27, 2012 at 11:08

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.