Package: nbd-server
Version: 1:2.9.23-3ubuntu1
Severity: important
When attempting to enable NBD_SWAP for LTSP, it was noticed that nbd-server was
repeatedly craching. The following was noticed
in /var/log/syslog (on the server):
Jan 17 15:22:25 MYserver nbdswapd[24394]: connect from 192.168.100.57
(192.168.100.57)
Jan 17 15:22:25 MYserver nbd_server[24400]: connect from 192.168.100.57,
assigned file is /tmp/tmp.HK8bw70YTy
Jan 17 15:22:25 MYserver nbd_server[24400]: Size of exported file/device is
67108864
Jan 17 15:22:26 MYserver nbd_server[24400]: Read failed: Inappropriate ioctl
for device
Jan 17 15:22:26 MYserver nbd_server[24400]: Exiting.
In this case, this instance of nbd_server is started by /usr/sbin/nbdswapd
which is part of the ltsp-server package which is called by inetd.
/etc/inetd.conf:
9572 stream tcp nowait nobody /usr/sbin/tcpd
/usr/sbin/nbdswapd
>From nbdswapd:
PATH=/usr/bin:/bin:$PATH nbd-server 0 $SWAP $NBD_SERVER_OPTS -C /dev/null >
/dev/null 2>&1
where $SWAP is a temp file created by:
dd if=/dev/zero of=$SWAP bs=1024k count=$SIZE 2> /dev/null
/sbin/mkswap $SWAP > /dev/null 2>&1
PATH=/usr/bin:/bin:$PATH nbd-server 0 $SWAP $NBD_SERVER_OPTS -C /dev/null >
/dev/null 2>&1
When performing the above steps manually with a non-zero port, the
'Inappropriate ioctl' error does not occur.
strace shows the ioctl error is on the tmp file ($SWAP):
open("/tmp/tmp.WUEdUu7YCb", O_RDWR) = 4
ioctl(4, BLKGETSIZE64, 0x7fff6a9bb4b8) = -1 ENOTTY (Inappropriate ioctl for
device)
fstat(4, {st_mode=S_IFREG|0666, st_size=67108864, ...}) = 0
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500,
'oneiric')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-14-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages nbd-server depends on:
ii adduser 3.112+nmu1ubuntu5 add and remove users and groups
ii debconf [debconf-2.0] 1.5.40ubuntu1 Debian configuration management sy
ii libc6 2.13-20ubuntu5 Embedded GNU C Library: Shared lib
ii libglib2.0-0 2.30.0-0ubuntu4 GLib library of C routines
ii ucf 3.0025+nmu2ubuntu1 Update Configuration File: preserv
nbd-server recommends no packages.
nbd-server suggests no packages.
-- debconf information:
nbd-server/convert: true
nbd-server/useports: false
nbd-server/name:
nbd-server/filename:
nbd-server/port:
nbd-server/autogen:
nbd-server/number: 0
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]