Created attachment 358437 [details] /etc/sysconfig/readonly-root Description of problem: service nfslock fails to start with readonly-root. /var/log/messages says: Aug 24 06:44:13 localhost rpc.statd[2410]: Version 1.0.9 Starting Aug 24 06:44:13 localhost rpc.statd[2410]: open (/var/lib/nfs/statd/state): Read-only file system Version-Release number of selected component (if applicable): nfs-utils-1.0.9-42.el5 How reproducible: always Steps to Reproduce: 1. Perform default install of RHEL 5.4 2. Configure /etc/sysconfig/readonly-root 3. Reboot Actual results: Service fails to start Expected results: Additional info: /etc/sysconfig/readonly-root is attached
Where statd write its state file when the root is read only?? Meaning how do other apps, like syslog, write to their logs in /var when its a read only root?
To answer my own question, it appears /var/log is tmpfs file system which is not persistent over reboots... Unfortunately the rpc.statd state file has to be persistent over reboots so its not clear we can do anything to fix this problem... Other than having the rpc.statd startup script not start up on read-only roots...
Development Management has reviewed and declined this request. You may appeal this decision by reopening this request.
Hi Steve, see /etc/rwtab for files and directories which are mounted as tmpfs when readonly root. Why does the rpc.statd file needs to be persistent?
(In reply to comment #4) > Hi Steve, > see /etc/rwtab for files and directories which are mounted as tmpfs when > readonly root. Why does the rpc.statd file needs to be persistent? rpc.statd provides reboot notification for clients and servers. When a client reboots it notifies all of the servers that it had mounted that it has rebooted so that any locks that it held can be dropped. When statd starts up, it expects to find: 1) a "sm" directory that holds files for each of the hosts it should notify of a reboot 2) a "state" file that it uses to determine what "state" it should send to the host So really, all of /var/lib/nfs/statd need to be writable when statd starts, and its contents need to be persistent across reboots.
(In reply to comment #5) > 1) a "sm" directory that holds files for each of the hosts it should notify of > a reboot > > 2) a "state" file that it uses to determine what "state" it should send to the > host > > So really, all of /var/lib/nfs/statd need to be writable when statd starts, and > its contents need to be persistent across reboots. 1. Does readonly-root'ed machine have to run nfslockd at all? In most scenarios it will probably have all exports "ro", so that locking isn't needed. 2. If nfs-locking IS really required with readonly-root, then placing /var/lib/nfs on some other, rw-filesystem would do the trick. Is that right?