Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Customer has a goal of using diskless systems, booting via NFS. In order to be able to share one root filesystem with all the servers, the idea is to user read only root filesystem, configured at /etc/sysconfig/readonly-root.
Although the configuration of stateless files and directories is working (through /etc/rwtab[.d]), it's not possible to configure persistent files.
As far as I noticed, rc.sysconfig partially implements this:
<..>
elif [ ! -z "$CLIENTSTATE" ]; then
# No local storage was found. Make a final attempt to find
# state on an NFS server.
mount -t nfs $CLIENTSTATE/$HOSTNAME $STATE_MOUNT -o rw,nolock
fi
<..>
The issue seems to be that $CLIENTSTATE is not set anywhere
Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6.x86_64 (RHEL 6.1)
How reproducible:
Always.
Steps to Reproduce:
1. Create a root filesystem, as described in http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/diskless-nfs-config.html
2. Modify PXE configuration to mount rootfs in read-only mode (/var/lib/tftpboot/pxelinux.cfg/default)
3. Edit /etc/sysconfig/readonly-root and change READONLY and TEMPORARY_STATE to "yes"
4. Create NFS export for persistent files:
# mkdir /exports/nfs/state
# echo -e “/exports/nfs/state\t192.168.122.0/255.255.252.0(rw,no_root_squash)” >> /etc/exports
# exportfs -ra
5. Add CLIENTSTATE=nfsserver.domain:/exports/nfs/state to kernel cmdline at /var/lib/tftpboot/pxelinux.cfg/default
6. Boot the diskless server
Actual results:
Persistent data export isn't mounted.
Expected results:
Persistent data export should be mounted according to CLIENTSTATE variable.
According to http://fedoraproject.org/wiki/StatelessLinux/ClientConfiguration, which seems to be outdated, CLIENTSTATE should be set on kernel command line.
Anyway, the only files rc.sysinit seems to source are:
. /etc/sysconfig/network
. /etc/init.d/functions
. /etc/selinux/config
. /etc/sysconfig/autofsck
. /etc/sysconfig/readonly-root
Which file would be the correct one to set CLIENTSTATE? Probably /etc/sysconfig/readonly-root, but I'd like to be sure of it. If this is true, wouldn't be nice to add something like the following to this config file?
# NFS server to use for persistent data?
CLIENTSTATE=
If empty, it wouldn't be used.
Description of problem: Customer has a goal of using diskless systems, booting via NFS. In order to be able to share one root filesystem with all the servers, the idea is to user read only root filesystem, configured at /etc/sysconfig/readonly-root. Although the configuration of stateless files and directories is working (through /etc/rwtab[.d]), it's not possible to configure persistent files. As far as I noticed, rc.sysconfig partially implements this: <..> elif [ ! -z "$CLIENTSTATE" ]; then # No local storage was found. Make a final attempt to find # state on an NFS server. mount -t nfs $CLIENTSTATE/$HOSTNAME $STATE_MOUNT -o rw,nolock fi <..> The issue seems to be that $CLIENTSTATE is not set anywhere Version-Release number of selected component (if applicable): initscripts-9.03.23-1.el6.x86_64 (RHEL 6.1) How reproducible: Always. Steps to Reproduce: 1. Create a root filesystem, as described in http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Storage_Administration_Guide/diskless-nfs-config.html 2. Modify PXE configuration to mount rootfs in read-only mode (/var/lib/tftpboot/pxelinux.cfg/default) 3. Edit /etc/sysconfig/readonly-root and change READONLY and TEMPORARY_STATE to "yes" 4. Create NFS export for persistent files: # mkdir /exports/nfs/state # echo -e “/exports/nfs/state\t192.168.122.0/255.255.252.0(rw,no_root_squash)” >> /etc/exports # exportfs -ra 5. Add CLIENTSTATE=nfsserver.domain:/exports/nfs/state to kernel cmdline at /var/lib/tftpboot/pxelinux.cfg/default 6. Boot the diskless server Actual results: Persistent data export isn't mounted. Expected results: Persistent data export should be mounted according to CLIENTSTATE variable.