Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 445072

Summary: NBD swap on ltsp client not working
Product: [Fedora] Fedora Reporter: Frantisek Hanzlik <franta>
Component: ltspAssignee: Warren Togami <wtogami>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-08-04 19:17:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 188611    

Description Frantisek Hanzlik 2008-05-03 07:52:46 UTC
Description of problem:
/etc/xinetd.d/nbdswapd on server specify port 9572, but on client side
usr/share/ltsp/ltsp-init-common specify default port 9210. Thus, without
is port 9572 explicitly defined in lts.conf, NBD swap isn't working.

I must add some small delay (sleep 0.5) to /usr/share/ltsp/ltsp-init-common
routine configure_swap after "modprobe nbd", else next command nbd-client
for some reason fail:

        modprobe nbd
        sleep 0.5
        nbd-client $SWAP_SERVER $NBD_PORT /dev/nbd0 && ....

Tested on 800MHz PIII/256MB thin client, on slower HW it maybe run OK...

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

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:

Comment 1 Warren Togami 2008-05-05 01:20:47 UTC
Thanks for the report.  We will look into this.
You might be interested to follow our development mailing list and weekly
development meetings.

Comment 2 Warren Togami 2008-05-05 21:56:02 UTC
Here's an interesting problem:

[root@newcaprica cups]# telnet 9572
Connected to
Escape character is '^]'.
/usr/sbin/nbdswapd: line 23: /dev/stderr: No such device or address
Connection closed by foreign host.

Do you see this as well?

Comment 3 Frantisek Hanzlik 2008-05-05 22:11:34 UTC
oh, sorry, it I resolved by changes (/usr/sbin/nbdswap):

 if [ -n "$SWAPDIR" ]; then
     if [ -d "$SWAPDIR" ] && [ -w "$SWAPDIR" ]; then

and path to nbd-server is on Fedora diferent:

 # start the swap server
-/bin/nbd-server 0 $SWAP $NBD_SERVER_OPTS -C /dev/null > /dev/null 2>&1
+/usr/bin/nbd-server 0 $SWAP $NBD_SERVER_OPTS -C /dev/null > /dev/null 2>&1
 # clean up the swap file

Comment 4 Frantisek Hanzlik 2008-05-05 22:26:22 UTC
And if I remember, directory "/var/lib/ltsp/swapfiles" (defined by SWAPDIR
in /etc/ltsp/nbdswapd.conf) was owned by root:root, mode 755 (I'm not sure).
But xinet daemod start /usr/sbin/nbdswapd as user "nobody", thus

chown nobody:root /var/lib/ltsp/swapfiles
chmod 770 /var/lib/ltsp/swapfiles

Comment 5 Bug Zapper 2008-05-14 10:35:07 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

Comment 6 Warren Togami 2008-05-16 17:02:27 UTC
Please look over the changes I made upstream with are slightly different from
your changes.  This works for me.  Will be in the next version pushed to updates.

Comment 7 Warren Togami 2008-08-04 19:17:28 UTC
This was fixed in Fedora 9 updates a while ago.  You get 64MB NBD swap by default now.  Edit /etc/ltsp/nbdswapd.conf to change the amount.