2

I am working on CentOS 7 Xen server with 100 GB memory. I have a master server with 1 TB hard disk space and 2 slave server

I increased disk space from 100 to 155 GB directly for /xen/vm4/abctest.img for virtual system /dev/xvda1

enter image description here

But now I get error

zsh: locking failed for /root/.zsh_history: read-only file system: reading anyway

Update

Using @HBruijn solution I tried mount -o remount,rw / but get error

mount: cannot remount /dev/xvda1 read-write, is write-protected

Appreciate any help.

techGaurdian
  • 123
  • 1
  • 7

1 Answers1

2

The error

zsh: locking failed for /root/.zsh_history: read-only file system

seems to indicate that your system is now read-only.

The default behaviour for most Linux file systems is to safeguard your data. When the kernel detects an error in the storage subsystem it will make the filesystem read-only to prevent (further) data corruption.

You can tune this somewhat with the mount option errors={continue|remount-ro|panic} which are documented in the system manual (man mount).

When your root file-system encounters such an error, most of the time the error won't be recorded in your log-files, as they will now be read-only too. Fortunately since it is a kernel action the original error message is recorded in memory first, in the kernel ring buffer. Unless already flushed from memory you can display the contents of the ring buffer with the dmesg command.
Resizing the storage is a likely cause though

Depending on the error messages, you could decide it is still safe to use your file-system and attempt to return it to a read-write condition with mount -o remount,rw /

HBruijn
  • 72,524
  • 21
  • 127
  • 192
  • Thank you for the help. I tried with mount -o remount,rw / command but get error *mount: cannot remount /dev/xvda1 read-write, is write-protected* Also I get zsh: corrupt history file /root/.zsh_history when I login to server with read only file system. I have updated my question. Please is there any other way to change readonly mode. Can I reduce the hard disk drive? will that help? – techGaurdian Apr 09 '19 at 21:25