View previous topic :: View next topic |
Author |
Message |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Wed Dec 07, 2005 7:49 pm Post subject: come montare partizione remota di linux? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
!equilibrium Bodhisattva
![Bodhisattva Bodhisattva](/images/ranks/rank-bodhisattva.gif)
![](images/avatars/10751772074409c2c3ce8ec.png)
Joined: 06 Jun 2004 Posts: 2109 Location: MI/BG/LC
|
Posted: Wed Dec 07, 2005 7:51 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Wed Dec 07, 2005 8:16 pm Post subject: |
|
|
che differenze ci sono?
Samba gia' lo ho installato, oppure nfs |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Wed Dec 07, 2005 8:26 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Wed Dec 07, 2005 9:18 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Wed Dec 07, 2005 9:34 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Wed Dec 07, 2005 9:43 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Wed Dec 07, 2005 10:15 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Thu Dec 08, 2005 11:06 am Post subject: |
|
|
ciao, scusami ancora, ma se i stato poco chiaro.
Il demone nfs lo devo lancaire sia sul server che sul client??? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Thu Dec 08, 2005 11:12 am Post subject: |
|
|
no, i client devono montare le partizioni come ti ho scritto qualche post sopra
il demone è lanciato sul server.
ciao |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Luca89 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/15529267248502dd4c2bab.jpg)
Joined: 27 Apr 2005 Posts: 2107 Location: Agrigento (Italy)
|
Posted: Thu Dec 08, 2005 11:18 am Post subject: |
|
|
allora:
server:
- compilato nel kernel il supporto al filesystem nfsd
- nfs-utils installati
- /etc/exports configurato
- demone nfs lanciato
client:
- compilato nel kernel il supporto al filesystem nfs
- portmap installato
- mount -t nfs nomepc:/prova /prova oppure automatizza tutto con fstab e aggiungi netmount nel runlevel default
_________________ Running Fast! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Thu Dec 08, 2005 12:29 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Thu Dec 08, 2005 1:07 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
power83 l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
Joined: 28 Nov 2004 Posts: 638
|
Posted: Thu Dec 08, 2005 1:14 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ilvalle Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/1227876817432eddd1a22f9.jpg)
Joined: 07 Mar 2005 Posts: 325 Location: Gallarate - ITALY
|
Posted: Thu Dec 08, 2005 1:45 pm Post subject: |
|
|
direi di si... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Luca89 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/15529267248502dd4c2bab.jpg)
Joined: 27 Apr 2005 Posts: 2107 Location: Agrigento (Italy)
|
Posted: Thu Dec 08, 2005 4:07 pm Post subject: |
|
|
Il modulo corretto per il server è "nfsd", inoltre ti consiglio di abilitare la versione 3 o 4. _________________ Running Fast! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|