0

all.

I want to remove mongod.lock. When I try sudo rm -rf mongod.lock I got this

rm: cannot remove ‘mongod.lock’: Read-only file system

Can anyone tell me how to force remove it?

Thanks, Ami

Aminah Nuraini
  • 1,029
  • 1
  • 8
  • 15

1 Answers1

2
rm: cannot remove ‘mongod.lock’: Read-only file system

Your filesystem has been mounted read-only. You cannot remove files from a read-only filesystem.

So your next task will be to determine why your filesystem is read-only. The kernel typically will remount the filesystem as read-only in response to significant filesystem corruption or other storage issues such as very high latency.

EEAA
  • 108,414
  • 18
  • 172
  • 242
  • Yup, you're right. It turns out there was sudden restart from my database so linux automatically change the drive to read-only to protect it from further disk error. We end up changing the disk. – Aminah Nuraini Dec 10 '15 at 13:31