Bug 435697

Summary: No swap in diskless environment
Product: Red Hat Enterprise Linux 4 Reporter: Ondrej Valousek <ondrejv>
Component: system-config-netbootAssignee: Jaroslav Reznik <jreznik>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 4.6   
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-04-06 11:21:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Valousek 2008-03-03 13:21:06 UTC
Description of problem:
I am trying to configure swap for diskless workstations using the local HDD by
modifying /etc/fstab to contain something like:
/dev/sda        swap            swap    defaults        0 0
but it does not work - the swap is not activated during the boot procedure.
Later manual activation by swapon -a command works fine.

Further investigation shows that the problem cause is the fact, that the block
device /dev/sda is not known to the system at the time /etc/rc.d/rc.sysinit
script is being executed.

Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. install a HDD into the machine booting via network
2. modify /etc/fstab to contain local swap partition on that hdd.
3. boot
  
Actual results:
no swap is activated

Expected results:
swap is activated as per configuration in /etc/fstab

Additional info:

Comment 1 Ondrej Valousek 2008-05-06 12:16:51 UTC
It turned out, that the hardware initialization is too early followed by the
attempt to active the swap so that the necessary block device in /dev is not yet
created.
The simple workaround to this problem is adding some small delay (sleep 5 in my
case seems to be sufficient) to the /etc/rc.d/rc.sysinit startup script before
activating the swap.
Ondrej

Comment 3 Jaroslav Reznik 2010-04-06 11:21:25 UTC
System-config-netboot is now in maintenance mode only, no further development
is planned for RHEL 4.x. Closing as WONTFIX. I'm not sure about exact sleep time before swap activation.