From: Niall O Broin (niall at domain linux.ie)
Date: Sun 26 Aug 2001 - 13:36:52 IST
John,
First, my apologies if your reaction to any of my questions here is
"What kind of a fscking idiot do you think I am anyway ?" but the
terminology used here vis a vis workstation and server can be confusing.
That said, I'll go on, as I tend to do :-)
On Sat, Aug 25, 2001 at 11:02:53PM +0100, John Gay wrote:
> >From the workstation I.E. the nbd server, the floppy and filesystem modules
> are loaded and I can create a tar of /etc onto floppy just fine.
Filesystem modules not needed, but ignore that - you've verified that the
nbd server has got floppy support loaded.
> When I log into the ltsp server via the workstation I.E. the nbd client, I
> can put the floppy into the server floppy drive and can list the contents of
> the floppy with tar tf /dev/fd0 just fine.
OK - you've now verified that you can read the tar file you just created,
and on a different box.
> When I start the nbd-client
> everything seems to work fine and the client connects to the server and I get
> a brief flicker on the floppy drive of the workstation but when I try to list
> the contents of the floppy in the workstation using tar tf
> /home/jgay/.dev/fd0 the terminal window just hangs...
>
> I tried running strace and I get a lot of stuff I don't understand I wonder
> if anyone can make sense of it.
Yes and no - I can intrepret what strace is telling you, but I won't be
giving you much information.
> open("/home/jgay/.dev/fd0", O_RDONLY|0x8000) = 3
> fstat64(0x3, 0x8067e60) = 0
> read(3,
The system call to open /home/jgay/.dev/fd0 succeeds and returns 3 which is
the file descriptor which will be used for subsequent I/O as with read,
write etc. Then an fstat on the file descriptor is done, and then a read,
which blocks - why it blocks is the question ?
How about this - here's a description of what I do on my boxes which works -
does what I do appear EXACTLY analogous with what you do ? In the
descriptions below,
+ is input to the client
- is output from the client
at domain is input to the server
& is output from the server
# is a comment from me
The server is the box on which I run nbd-server and is the box which has the
floppy drive (in your case, it's the LTSP workstation). Its IP address is
192.168.1.101.
The client is the box on which I run nbd-client and is the box which needs
to use the floppy drive (in your case, it's the LTSP server). Its IP address is
192.168.1.1. Everything below is in chronological order.
at domain tar cvf /dev/fd0 /etc/hosts
& tar: Removing leading /' from member names
& etc/hosts
at domain tar tf /dev/fd0
& etc/hosts
# tar file created on the floppy and checked
at domain ./nbd-server 1025 /dev/fd0
# nbd server program started successfully (no output from server)
+ modprobe nbd
- nbd: registered device at major 43
# This is only necessary if you haven't compiled nbd support into your
# kernel. With the right modules.conf it wouldn't be necessary either
# but it's useful here for illustration.
+ lsmod
- Module Size Used by
- nbd 13056 0 (unused)
- pcnet32 10776 1
- cloop 33932 1
# module is loaded but not yet used
+ ls -l /root/.dev/fd0
- brw-rw-rw- 1 root root 43, 0 Aug 26 12:26 .dev/fd0
+ ./nbd-client 192.168.1.101 1025 /root/.dev/fd0
- Negotiation: ..size = 1440KB
- bs=1024, sz=1440
# Start the client - give messages about block size and size of the device
& connect from 192.168.1.1, assigned file is /dev/fd0
& Can't open authorization file nbd_server.allow (No such file or directory).
& Authorized client
& Starting to serve
& Opening /dev/fd0
& size of exported file/device is 1474560
# nbd-server gives some messages about the connection. It can't open the
# authorization file nbd_server.allow but that's OK - the absence of one means
# that any machine can connect - a tad :-) insecure but OK in a small LTSP
# environment. Then it tells us it's serving up /dev/fd0 and how big it is.
+ tar tf /root/.dev/fd0
- etc/hosts
# and we view the tar file on the floppy.
+ mke2fs /root/.dev/fd0
# Now we'll create a filesystem on the floppy. I haven't bothered showing the
# output of mke2fs - it's just the usual. Now we'll make a mount point
+ mkdir /mnt/nbd_fs
# and mount it
+ mount /root/.dev/fd0 /mnt/nbd_fs
# and confirm that it is mounted
+ df /mnt/nbd_fs
- Filesystem 1k-blocks Used Available Use% Mounted on
- /root/.dev/fd0 1412 13 1327 1% /mnt/nbd_fs
# and have a look at the filesystem
+ ls /mnt/nbd_fs
- lost+found
- total 12
- drwxr-xr-x 2 root root 12288 Aug 26 13:26 lost+found
So, It Works For Me (TM). Have a look at what I've done there, try to
replicate the steps, and if you don't succeed, get back to us with where you
failed. BTW the stuff at the end where I made a filesystem etc. is pure
icing - if you succeed in viewing the tar file from the nbd client, your nbd
setup is working correctly.
Kindest regards,
Niall
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:49 GMT