1

I am trying to delete a file on an Ubuntu 12.04 system for which I have root access. However, I am getting this error:

root@CRST-Web:/home/real_property/html# rm -r -f results.php
rm: cannot remove `results.php': Read-only file system

df /home/real_property/html output:

Filesystem                     1K-blocks     Used Available Use% Mounted on
/dev/mapper/CRST--Web--vg-root 121407596 65468436  49748876  57% /

I tried to remount the partition rw but it failed:

# mount / -o remount,rw
mount: cannot remount block device /dev/mapper/CRST--Web--vg-root read-write, is write-protected
terdon
  • 234,489
  • 66
  • 447
  • 667
Aashil
  • 111
  • 2
  • 1
    Have you rebooted since getting this problem? if the root file system has errored to a `RO` state, it cannot be remounted `rw` while running. If the state has persisted through a reboot, then that information could lead to other potential problems. – Gravy Feb 08 '16 at 17:44
  • It is a server running ubuntu 12.04. I will reboot the server and let you know. – Aashil Feb 08 '16 at 17:47
  • 3
    Check `lvdisplay CRST-Web-vg/root` to see if the logical volume is set read-only. Actually check `lvs` as well, to see if (for example) you have a snapshot that filled up. I wouldn't recommend a reboot before figuring out why the roootfs has gone read-only—high risk of the machine not coming back from the reboot (hope this warning isn't too late.) – derobert Feb 08 '16 at 18:23
  • I rebooted the server and fsck automatically mounted the partition back to rw. – Aashil Feb 10 '16 at 17:09

0 Answers0