LVM returns locking error and all file-systems are read only
Environment
Red Hat Enterprise Linux 6
Issue
- LVM commands return locking error immediately after boot up
# vgdisplay
File-based locking initialisation failed.
mount
command reports that/etc/mtab
is not writable
# mount
mount: warning: /etc/mtab is not writable (e.g. read-only filesystem).
It's possible that information reported by mount(8) is not
up to date. For actual information about your system mount points
check the /proc/mounts file
- Hostname appears to be set to (none) on the prompt
(none) Login: root
Password:
[root@(none) ~]#
Resolution
Copy a fresh /etc/rc.d/rc.sysinit
file from a working machine to this machine
Root Cause
- The
/etc/rc.d/rc.sysinit
file is damaged and needs to be replaced - Without this file, no file-systems are mounted read-write
- Without this file, LVM locking will fail
Diagnostic Steps
- Check to see if your filesystems are read only
# touch /filesystem_mountpoint/test
touch: cannot touch `test': Read-only file system
- Check to see if rc.sysinit exists and has data
# ls -l /etc/rc.d/rc.sysinit
-rwxr-xr-x. 1 root root 0 Jan 9 08:38 /etc/rc.d/rc.sysinit
# cat /etc/rc.d/rc.sysinit
#
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments