[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Nbd] NBD help



Firsts of all, thanks to Wouter Verhelst for his fastest aid.
I'll tell the followed process:

 I've got three machines (lirio (kernel version 2.6), margarita (k.v. 2.4) and thewish (k.v. 2.6) with nbd-2.8.0-rc2.tar.gz installed

In my nbd-server:


 lirio:/home/soft/nbd/bin#./nbd-server 1024 /tmp/delme
 

In the first client:

   margarita:/home/soft/nbdu/NBD/sbin # ./nbd-client lirio 1024 /dev/nd0

   Negotiation: ..size = 215220KB
   bs=1024, sz=215220
   margarita:/home/soft/nbdu/NBD/sbin # mke2fs /dev/nd0
      mke2fs 1.35 (28-Feb-2004)
      Filesystem label=
      //...

      Superblock backups stored on blocks:
        8193, 24577, 40961, 57345, 73729, 204801

      Writing inode tables: done                           
      Writing superblocks and filesystem accounting information: done

      This filesystem will be automatically checked every 34 mounts or
      180 days, whichever comes first.  Use tune2fs -c or -i to override.

   margarita:/home/soft/nbdu/NBD/sbin # mount /dev/nd0 /mnt/
   margarita:/home/soft/nbdu/NBD/sbin # cd /mnt/
   margarita:/mnt # ls
   .  ..  lost+found
   margarita:/mnt # mkdir kk
   margarita:/mnt # cd kk
   margarita:/mnt/kk # ls
   .  ..
   margarita:/mnt/kk # touch p1
   margarita:/mnt/kk # echo hello > p1
   margarita:/mnt/kk # more p1
   hello
   margarita:/mnt/kk # cd  /
   margarita:/ # umount mnt/

Now, we use the second client:

    thewish:/home/soft/nbdu/NBD/sbin # ./nbd-client 10.10.52.12 1024 /dev/nd0
    Negotiation: ..size = 215220KB
    bs=1024, sz=215220

    thewish:/ # mount /dev/nd0 mnt/
    thewish:/ # cd mnt/
    thewish:/mnt # ls
    .  ..  kk  lost+found
    thewish:/mnt # cd kk
    -bash: cd: kk: Input/output error

Another contemplated case, consist of: we want two servers with samba,
one of them will have the shared data. What do you think if one server
access using nbd to the other one   and after that both serves access
the clients using NFS and samba?

Thanks,

Wouter Verhelst wrote:
On Tue, Apr 26, 2005 at 02:05:34PM +0200, Jordi Ingles wrote:
  
Hello, we are raising to use nbd like NFS substitute. We have a 
nbd-server whith  two clients who acces in the same device. First we 
mount a client, it modifies the device, and then we  unmount it. When we 
mount the second client, this one has problems accessing the files that 
has been modified by the first one (Input/Output error). Does NBD allow 
this kind of operations? (nbd such as samba).
    
Yes and no.

NBD is not a file server protocol; trying to use it as such would be a
waste of time at best.

That being said, it /should/ work the way you describe it (connect on
one system, mount, write, umount, start using on another system). It
would help if you could send me the complete error message. Also, do you
see any difference if you disconnect the device (nbd-client -d) between
the umount on the one system, and the mount on the other?

  

-- 


 ----------------------------------------------------------------------
|Jordi Inglés Camats              |    Area: ASAC                      |
|mail: jingles@...50...        |    Becari Sistemes i Comunicacions |
|tel: 93 401 62 30 / 670 39 25 72 |    LCFIB                           |
|despatx: B6S104                  |                                    |
 ----------------------------------------------------------------------


Reply to: