Operating System - Linux
1753876 Members
7172 Online
108809 Solutions
New Discussion

Re: File System goes to read-only mode

 
maheshenturu
Occasional Contributor

File System goes to read-only mode

 
Some times filesystems goes to read-only mode
 
Solution is:
 
Unmount the filesystem run fsck and them check again.
 
Example:
 
Tried to create a file :
 
touch a
touch: cannot touch `a': Read-only file system
 
# umount /filesystem
 
Note: you might some time face error as below:
umount: /database/db: device is busy.
        (In some cases useful info about processes that use
         the device is found by lsof(8) or fuser(1))
then
 # lsof <filesyustem>
to see which process is holding FS from unmounting
Then kill that process
 
# kill -9 pid
 
then again umount <filesystem>
Now you might mount again and see if issue is resolved or run fsck
 
 #e2fsck -f /dev/mapper/database
e2fsck 1.41.12 (17-May-2010)
/dev/mapper/database_vg-database_lv: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/mapper/database_vg-database_lv: ***** FILE SYSTEM WAS MODIFIED *****
/dev/mapper/database_vg-database_lv: 237/327680000 files (1.3% non-contiguous), 957693776/1310717952 blocks
 
THis should sove the issue.
 
 
IF you are provided rights to reboot in case if fsck doesnt resolve the issue rebooting server will work. 
 
 
Thanks,
Mahesh
1 REPLY 1
chindi
Respected Contributor

Re: File System goes to read-only mode

Is it resolved ?

Or you are seeking a solution here ?