File System Read Only

Applicable for Centos/Red-Hat/Fedora

Step:-1

Check the file system status

root@techsuccor [~]# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,data=ordered,jqfmt=vfsv0,usrjquota=quota.user 0 0
/dev /dev tmpfs rw 0 0
/proc /proc proc rw 0 0
/sys /sys sysfs rw 0 0
/proc/bus/usb /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
/dev/sda8 /home ext3 ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user 0 0

Here it will show the status as below where the filesystems goes read-only.

/dev/sda8 /home ext3 ro,data=ordered,jqfmt=vfsv0,usrjquota=quota.user 0 0

 

Step : 2
Boot the Server in Single User Mode
# init 1

Unmount the partition

# umount /dev/sda8

And Run FSCK

# fsck /dev/sda8

Now Mount the Partition again.
# mount /dev/sda8 /home

And check the File System Status Again

#cat /proc/mounts

Note :
If while unmounting you get the below error

# umount /dec/sda8
umount /dev/sda8 device is busy

then

Search the process using the drive And Kill it
# lsof | grep “/dev/sda8”
vim 2693 pingu cwd DIR 8,4 4096 73729 /dev/sda8

# kill -9 2693

now try un-mounting again.

 

 

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *