LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-21-2010, 03:28 PM   #1
marco.hahn
LQ Newbie
 
Registered: Jan 2007
Distribution: Ubuntu 14.04
Posts: 23

Rep: Reputation: 0
nbd troubles


Hi, I'm thinking of a new DVD-less system and may occasionally need to use the DVD of another system. I thought that nbd would be a good choice.

But alas: On the server with the DVD (Gentoo 2006.1), I start nbd-server (2.8.2) with

Code:
nbd-server 55433 /dev/hdc -l 192.168.83.240
and on the client (Ubuntu 10.4), I start nbd-client (2.9.14) with

Code:
sudo nbd-client 192.168.83.11 55433 /dev/nb0
However, all I get is this error message:

Code:
Error: Cannot open NBD: No such file or directory
Please ensure the 'nbd' module is loaded.
Unfortunately, Google is not a great help, as there are almost no results for these messages. Anyone has any idea?

Thanks,
marco.hahn
 
Old 09-22-2010, 08:14 AM   #2
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 933

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
NBD consists of a kernel module and userspace programs. The error you're showing says that the kernel module is not loaded. It only needs to be loaded on the machine running nbd-client, not nbd-server.

I run Slackware but these commands should be available on either Gentoo or Ubuntu.

To verify check the machine that is running nbd-client:
Code:
lsmod | grep nbd
To load it manually on the nbd-client machine:
Code:
modprobe nbd
 
Old 09-22-2010, 01:27 PM   #3
marco.hahn
LQ Newbie
 
Registered: Jan 2007
Distribution: Ubuntu 14.04
Posts: 23

Original Poster
Rep: Reputation: 0
I forgot to mention in my first post, but nbd is loaded.
 
Old 09-22-2010, 01:30 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 933

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
Quote:
Originally Posted by marco.hahn View Post
Code:
sudo nbd-client 192.168.83.11 55433 /dev/nb0
However, all I get is this error message:

Code:
Error: Cannot open NBD: No such file or directory
Please ensure the 'nbd' module is loaded.
...then check to see if sudo is setup correctly for nbd-client
 
Old 06-26-2013, 05:07 PM   #5
rojoblandino
LQ Newbie
 
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 22

Rep: Reputation: 0
I am having same problem:

Code:
root@api:~# nbd-client 192.168.1.81 1043 /srv/nbd/disk1
Error: Cannot open NBD: No such file or directory
Please ensure the 'nbd' module is loaded.
Exiting.
Code:
root@api:~# lsmod  | grep nbd
nbd                     8001  0
And my logs shows following:

Code:
Jun 26 15:02:51 api nbd_client[6744]: Cannot open NBD: No such file or directory#012Please ensure the 'nbd' module is loaded.
Jun 26 15:02:51 api nbd_client[6744]: Exiting.
 
Old 06-26-2013, 05:37 PM   #6
rojoblandino
LQ Newbie
 
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 22

Rep: Reputation: 0
Quote:
Originally Posted by rojoblandino View Post
I am having same problem:

Code:
root@api:~# nbd-client 192.168.1.81 1043 /srv/nbd/disk1
Error: Cannot open NBD: No such file or directory
Please ensure the 'nbd' module is loaded.
Exiting.
Code:
root@api:~# lsmod  | grep nbd
nbd                     8001  0
And my logs shows following:

Code:
Jun 26 15:02:51 api nbd_client[6744]: Cannot open NBD: No such file or directory#012Please ensure the 'nbd' module is loaded.
Jun 26 15:02:51 api nbd_client[6744]: Exiting.
I am using debian squeeze and made it work succesfully, the trick is filling the file /etc/nbd-client

Code:
NBD_DEVICE[0]=/dev/nbd1
#
# Type; s=swap, f=filesystem (with entry in /etc/fstab), r=raw (no other setup
# than to run the client)
NBD_TYPE[0]="r"
#
# The host on which the nbd-server process is running
NBD_HOST[0]="192.168.1.81"
#
# The port on which this client needs to connect
NBD_PORT[0]="1043"
#
# Any extra parameters you would want to specify
NBD_EXTRA[0]=
And woala, it worked:

Code:
root@api:~# /etc/init.d/nbd-client start
Starting NBD client process: Connecting...Negotiation: ..size = 20971520KB
bs=1024, sz=20971520
connected /dev/nbd1
Activating...
/dev/nbd1: raw selected. doing nothing.
nbd-client.
In few works the nbd-client work but with the file not directly with the command.
 
Old 06-27-2013, 05:50 PM   #7
rojoblandino
LQ Newbie
 
Registered: Nov 2007
Distribution: SuSE Debian
Posts: 22

Rep: Reputation: 0
I have made succesfully a RAID with nbd drives, but after placing it under production i did some tests.

1) When a cluster server of one of the nbd being in the RAID is shutdown or network goes off. The mdadm takes 15 minutes to response when a check is done the console goes in blank and no response is given around 15 minutes. Then the mdadm give output normally showing that a nbd drive is faulty spare.

2) To re-attach the nbd drive the RAID must be unmounted then stopped, and nbd-client must be restarted.

3) Then RAID recovery procedures must be followed normally.

I did not experience any problem using RAID6 over nbd, the info keeps consistent and nbd answer very well, the only inconvenient is the 15 minutes mdadm takes to show the results when a failure occurs.

Having a RAID over nbd not shure what happen if switch is off. Shurely data may be lost a good backup always will be needed.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] NBD 2.9.17 - 2010-08-06 release Chuck56 Linux - Server 1 08-09-2010 11:18 AM
How do I get mdadm to assemble a raid using local and nbd devices adrian_stephens Linux - Server 3 05-29-2009 11:42 AM
How to recover a raid1 over nbd after failure of local disk? adrian_stephens Linux - Server 1 05-22-2009 01:16 PM
troubles with SATA, troubles with NVIDIA aevangelica Linux - Hardware 6 10-17-2005 03:39 AM
After VFS install (sucessfull) Boot/Shutdown /dev/nbd/1-127 error Giallo998 Linux - Hardware 0 03-06-2005 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration