LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-27-2012, 09:23 PM   #1
vikky
LQ Newbie
 
Registered: Apr 2012
Posts: 26
Blog Entries: 1

Rep: Reputation: Disabled
error: read only filesystem


not able to write to create new files

tried:

mount -o rw,remount /


Thanks,
vikky
 
Old 11-27-2012, 10:06 PM   #2
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Could you be more specific? Where are you trying to write and create new files? When do you get the error? From the command you posted it seems you're talking about your root partition, but it's not clear what are you trying to do. In case you're trying to write/create files outside your /home/user directory, you will need root permissions (i.e. su/sudo login).
 
Old 11-27-2012, 11:08 PM   #3
vikky
LQ Newbie
 
Registered: Apr 2012
Posts: 26

Original Poster
Blog Entries: 1

Rep: Reputation: Disabled
i was login as a root only

but when i try to create any file using touch command

getting error read only file system

but, when i rebooted the host its working ,but i don't know what is the exactly issue,
 
Old 11-28-2012, 08:26 PM   #4
lstein89
LQ Newbie
 
Registered: Sep 2008
Posts: 1

Rep: Reputation: 0
root fs will be automatically remounted read-only if a filesystem error is encountered that is uncorrectable. This is done to protect against any further data corruption and usually means you've got a dying drive. You probably won't see the actual error in the logs as the system wouldn't have been able to write to the log after remounting the filesystem read-only. When it occurs, you will probably see a lot of errors on the console - like ATA timeout errors, journal aborted, etc.

You should run offline fsck as soon as possible to be sure. For the root filesystem this is best done using a rescue disk (such as sysrescuecd). Your fixed HD will usually be /dev/sda if booting from sysrescuecd.

This can usually be accomplished also by passing init=/bin/bash at the boot prompt to skip system startup scripts and go straight to shell prompt. The root filesystem may or may not be mounted read-only, but with no active services running, you can run "mount -o remount,ro /" before "fsck -f /" to be sure the filesystem is actually mounted read-only. You DO NOT want to run fsck on an active (read-write) filesystem!

You'll want to check /var/log/messages for any warnings about your drive(s) that may have been written before the critical error occurred. Also install smartmon utils and run smartctl -a /dev/<your_root_fs_device> and check Reallocated_Sector_Ct and Current_Pending_Sector. Reallocated_Sector_Ct means bad sectors have been found on the disk and have been migrated to spare sectors on the disk. Current_Pending_Sector means bad sectors have been found but have not been migrated to spare sectors. Both should ideally be zero, but Current_Pending_Sector is a bigger problem than Reallocated_Sector_Ct (maybe no more spare sectors available).

If you have no pending or reallocated sectors, you probably have a bad data cable or the cables connected to the drive aren't making good contact and just need to be reseated.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] crontab -e read-only filesystem error blainemiller Linux - Server 7 03-09-2011 05:32 PM
Read-only filesystem error s_federici Linux - Server 7 09-13-2010 10:30 PM
Raid disk problem : Attempt to read block from filesystem resulted in short read ElmPie Linux - General 5 08-26-2008 05:21 AM
error mounting ext3 filesystem... mount: /dev/hdd1: can't read superblock versaulis Linux - Software 5 11-26-2006 08:34 PM
my linux error : Couldn't open /dev/null (read-only filesystem) Darick Ang Linux - General 3 10-28-2003 01:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration