Hi Wouter, sorry for the late response, I had to re-activate my test setup.
On Tue, May 15, 2012 at 10:40:29PM +0200, Wouter Verhelst wrote: > Anyway: > > On Thu, Jan 19, 2012 at 06:35:36PM +0100, Andreas B. Mundt wrote: > > I am trying to make swap space available to diskless clients using nbd > > on a squeeze network. However, using the third option as described in > > the debconf template fails: > > > > You can export a real block device (for instance "/dev/hda1"); a normal > > file (such as > > "/export/nbd/bl1"); or a bunch of files all at once. For the third > > option, you can use > > "%s" in the filename, which will be expanded to the IP-address of the > > connecting > > client. An example would be "/export/swaps/swp%s". > > > > I tried "/opt/swp%s" with and without '"', and prepared the file > > /opt/swp10.0.0.201 like: > > > > dd if=/dev/zero of=swp10.0.0.201 bs=1024k count=0 seek=64 > > mkswap swp10.0.0.201 > > > > but the clients complain about not enough swap area to use on > > /dev/nbd0. > > What does the server say in its syslog at this point? > Jun 3 11:14:54 mainserver nbd_server[16197]: connect from 10.0.1.12, assigned file is /tmp/swap%s Jun 3 11:14:54 mainserver nbd_server[16197]: Can't open authorization file (null) (Bad address). Jun 3 11:14:54 mainserver nbd_server[16197]: Authorized client Jun 3 11:14:54 mainserver nbd_server[30068]: Starting to serve Jun 3 11:14:54 mainserver nbd_server[30068]: Could not open exported file /tmp/swap%s: No such file or directory Jun 3 11:14:54 mainserver nbd_server[30068]: Exiting. Jun 3 11:16:41 host nbd_client[1920]: Server closed connection Jun 3 11:16:41 host nbd_client[1920]: Exiting. Jun 3 11:14:54 mainserver nbd_server[16197]: Child exited with 1 So the assigned file is not "/tmp/swap10.0.1.12" as expected, but "/tmp/swap%s". "%s" is not replaced by the IP-address connecting. Of course, "/tmp/swap%s" does not exist. > > As soon as I prepare a file /opt/swp%s in the same way, swap space is > > available on the client and anything works fine. > > Did you modify the server config file? If so, what did you set the > "virtstyle" option to? > No, no special modifications at all: root@mainserver:~# cat /etc/nbd-server/config [generic] # If you want to run everything as root rather than the nbd user, you # may either say "root" in the two following lines, or remove them # altogether. Do not remove the [generic] section, however. user = nbd group = nbd # What follows are export definitions. You may create as much of them as # you want, but the section header has to be unique. [export] exportname = /tmp/swap%s port = 9573 > > So it looks as if %s is not replaced by the IP-address of the client. Hope this helps debugging the issue. Best regards, Andi -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org