Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
come montare partizione remota di linux?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian)
View previous topic :: View next topic  
Author Message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Wed Dec 07, 2005 7:49 pm    Post subject: come montare partizione remota di linux? Reply with quote

ciao a tutti, ho visto che c'e' stato un ennesimo cambiamento al forum, spero di aver azzeccato la sezione.

Ora il problema:

- come posso montare su un client linux una partizione (o una directory) remota di un altro sistema linux (che fungeda server)?

grazie
Back to top
View user's profile Send private message
!equilibrium
Bodhisattva
Bodhisattva


Joined: 06 Jun 2004
Posts: 2109
Location: MI/BG/LC

PostPosted: Wed Dec 07, 2005 7:51 pm    Post subject: Reply with quote

hai diverse possibilità:

- samba
- nfs
- NBD
- coda

samba è il facile da implementare, poi vedi tu quale è quello che + si congegna alle tue necessità
_________________
Arch Tester for Gentoo/FreeBSD
Equilibrium's Universe

all my contents are released under the Creative Commons Licence by-nc-nd 2.5
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Wed Dec 07, 2005 8:16 pm    Post subject: Reply with quote

che differenze ci sono?

Samba gia' lo ho installato, oppure nfs
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Wed Dec 07, 2005 8:26 pm    Post subject: Reply with quote

Ti consiglio nfs, se l'hai già installato,
sul server il demone legge il file delle directory da esportare, il client le carica semplicemente
Sul server
Code:
ada ~ # cat /etc/exports
/usr/portage/distfiles 192.168.0.0/24(rw,async,no_root_squash)

Sul client
Code:
cat /etc/fstab
/.../
ada:/usr/portage/distfiles      /usr/portage/distfiles  nfs     rw,exec,async,hard,intr,noatime         0 0
/.../

Oppure con shfs, usando ssh
Code:

emerge shfs
modprobe shfs
mount -t shfs utente@server /mio/path

[Edit]Dai un occhio qui https://forums.gentoo.org/viewtopic-t-251056.html

Ciao
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Wed Dec 07, 2005 9:18 pm    Post subject: Reply with quote

ok grazie, e' perfetto nfs.

ps: pensavo di averlo ma nn l'ho. COme lo installo? cosa emergo? il kernel devo settare cose in particolare, considerando gia' che uso iptables, ATM, PPP e tutta la roba per NATtarmi al server?
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Wed Dec 07, 2005 9:34 pm    Post subject: Reply with quote

Per il firewall dipende che regole hai messo, ma di solito il firewall è verso la rete esterna (internet)
Per installare nfs è da abilitare nel kernel
Code:
Symbol: NFS_FS [=y]                                                                                                                                          x 
  x Prompt: NFS file system support                                                                                                                              x 
  x   Defined at fs/Kconfig:1318                                                                                                                                 x 
  x   Depends on: NET && INET                                                                                                                                    x 
  x   Location:                                                                                                                                                  x 
  x     -> File systems                                                                                                                                          x 
  x       -> Network File Systems                                                                                                                                x 
  x   Selects: LOCKD && SUNRPC   


Ovviamente devi ricompilare sia il server con il supporto per i demoni nfs
che gli host della rete per il supporto del file system.
Installa poi
Code:
*  net-fs/nfs-utils
      Latest version available: 1.0.6-r6
      Latest version installed: 1.0.6-r6
      Size of downloaded files: 259 kB
      Homepage:    http://nfs.sourceforge.net/
      Description: NFS client and server daemons
      License:     GPL-2



Paolo
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Wed Dec 07, 2005 9:43 pm    Post subject: Reply with quote

bene, appena ho tempo e posso riavviare il server provo.

Grazie molto per l'aiuto e per la pazienza e disponibilta'.

EDIT: quali sarebbero il daemon e il client che devo lanciare e come?
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Wed Dec 07, 2005 10:15 pm    Post subject: Reply with quote

Se Guardi nel kernel !!! : )
Ci son impostazioni che servono al server , e altre solo per i client...

Per il demone sul server non ha bisogno di nessuna impostazione particolare.
Per i client è come ti ho detto prima
Code:
/etc/init.d/nfs start

Code:
rc-update add default nfs

Puoi dare un occhio hai log, non fa mai male.

Unica problema
Se due client desiderano leggere un file condiviso, il primo ottiene muta-esclusione
e il secondo riceve errore... Il problema si risolve montando il filesystem solo in read-only
ma per quello che lo uso io, non è una soluzione corretta, abbiamo nella lan una partizione
per i distfiles, tutti possono scriverci, ma lo stesso file è leggibile solo da uno alla volta.
[/code]Che pacco
Qualcuno ha qualche idea?


Paolo
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Wed Dec 07, 2005 10:29 pm    Post subject: Reply with quote

Per quanto riguarda iptables c'è questo
https://forums.gentoo.org/viewtopic-t-167583-highlight-iptables.html

Magari ti può essere utile

Paolo
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Thu Dec 08, 2005 11:06 am    Post subject: Reply with quote

ciao, scusami ancora, ma se i stato poco chiaro.

Il demone nfs lo devo lancaire sia sul server che sul client???
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Thu Dec 08, 2005 11:12 am    Post subject: Reply with quote

no, i client devono montare le partizioni come ti ho scritto qualche post sopra
il demone è lanciato sul server.

ciao
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Thu Dec 08, 2005 11:18 am    Post subject: Reply with quote

allora:

server:

  1. compilato nel kernel il supporto al filesystem nfsd
  2. nfs-utils installati
  3. /etc/exports configurato
  4. demone nfs lanciato

client:

  1. compilato nel kernel il supporto al filesystem nfs
  2. portmap installato
  3. mount -t nfs nomepc:/prova /prova oppure automatizza tutto con fstab e aggiungi netmount nel runlevel default

_________________
Running Fast!
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Thu Dec 08, 2005 12:29 pm    Post subject: Reply with quote

Perfetto, grazie ora e' tutto chiaro.

solo che mi da dei problemi sul server.

Configurazione del kernel:

Code:
  │ │       <M> NFS file system support   
  │ │       [ ]   Provide NFSv3 client support         
  │ │       [*]   Provide NFSv4 client support (EXPERIMENTAL) 
  │ │       [*]   Allow direct I/O on NFS files (EXPERIMENTAL)             
  │ │       < > NFS server support                                             
  │ │       --- Secure RPC: Kerberos V mechanism (EXPERIMENTAL)           
  │ │       < > Secure RPC: SPKM3 mechanism (EXPERIMENTAL)           
  │ │       <M> SMB file system support (to mount Windows shares etc.)           
  │ │       [ ]   Use a default NLS                                                                   
  │ │       <M> CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)
  │ │       [ ]   CIFS statistics                       
  │ │       [ ]   CIFS extended attributes (EXPERIMENTAL)     
  │ │       [ ]   CIFS Experimental Features (EXPERIMENTAL)     
  │ │       < > NCP file system support (to mount NetWare volumes)           
  │ │       < > Coda file system support (advanced network fs)       
  │ │       < > Andrew File System support (AFS) (Experimental)


cat /etc/exports (sul server ovviamente):
Code:
/usr/portage/distfiles 192.168.0.0/24(rw,async,no_root_squash)


Prova avviamento demone:
Code:
epia-m / # /etc/init.d/nfs start
 * Mounting RPC pipefs ...                             [ ok ]
 * Starting NFS statd ...                                [ ok ]
 * Exporting NFS directories ...                      [ ok ]
 * Starting NFS daemon ...
 * Error starting NFS daemon                        [ !! ]
 * Starting NFS mountd ...                             [ ok ]
epia-m / #


xke' va in errore?

ho caricato il modulo nfs (E automaticamente si son caricati locks e sunrpc).
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Thu Dec 08, 2005 1:07 pm    Post subject: Reply with quote

hai caricaro il modulo sbagliato.
devi selezionare il modulo per il supporto del nfs server,
Code:
x Symbol: NFSD [=y]                                                         x 
  x Prompt: NFS server support                                                x 
  x   Defined at fs/Kconfig:1402                                              x 
  x   Depends on: NET && INET                                                 x 
  x   Location:                                                               x 
  x     -> File systems                                                       x 
  x       -> Network File Systems                                             x 
  x   Selects: LOCKD && SUNRPC && EXPORTFS         


[edit] Seleziona la versione 3.

Ciao
Back to top
View user's profile Send private message
power83
l33t
l33t


Joined: 28 Nov 2004
Posts: 638

PostPosted: Thu Dec 08, 2005 1:14 pm    Post subject: Reply with quote

ma leggendo la guida andando su help nelal riga del modulo del server mi dice che posso anche nn metterlo ed usare il demone e basta, tra l'altro supporta penso solo a V2 il modulo.

Allora il modulo che ho messo io devo metterlo invece sul client?
Back to top
View user's profile Send private message
Ilvalle
Guru
Guru


Joined: 07 Mar 2005
Posts: 325
Location: Gallarate - ITALY

PostPosted: Thu Dec 08, 2005 1:45 pm    Post subject: Reply with quote

direi di si...
Back to top
View user's profile Send private message
Luca89
Advocate
Advocate


Joined: 27 Apr 2005
Posts: 2107
Location: Agrigento (Italy)

PostPosted: Thu Dec 08, 2005 4:07 pm    Post subject: Reply with quote

Il modulo corretto per il server è "nfsd", inoltre ti consiglio di abilitare la versione 3 o 4.
_________________
Running Fast!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum