NAS on Raspberry

Transcript

NAS on Raspberry
NAS on
Raspberry
Stefano Ballardini
10262013 @ I.I.S. Alberghetti - Imola
11092013 @ Sala Consigliare Comune di Faenza - Faenza
DEFINIZIONE DI N.A.S.
Un Network Attached Storage (NAS) è un dispositivo
collegato ad una rete di computer la cui funzione è
quella di condividere tra gli utenti della rete una
memoria di massa, in pratica costituita da uno o più
dischi rigidi
(from Wikipedia)
VANTAGGI
- Dati centralizzati
- Dati in sicurezza
PRIMO INGREDIENTE: il RaspBerry Pi
DEFINIZIONE DI RASPBERRY PI
Il Raspberry Pi è un single-board computer (un
calcolatore implementato su una sola scheda
elettronica) sviluppato nel Regno Unito dalla
Raspberry Pi Foundation
( from Wikipedia )
http://www.raspberrypi.org/
CARATTERISTICHE HW DEL RASPBERRY
SECONDO INGREDIENTE: SdCard compatibile
http://elinux.org/RPi_SD_cards
http://www.raspberrypi.org/
TERZO INGREDIENTE: la Raspbian
DEFINIZIONE
Raspbian is a free operating system based on Debian
optimized for the Raspberry Pi hardware
- www.raspbian.org
- http://www.raspberrypi.org/downloads
+
= Raspbian
INSTALLAZIONE di Raspbian:
dd bs=4M if=immagine-wheezy-raspbian.img of=/dev/X
INSTALLAZIONE di Raspbian:
dd bs=4M if=immagine-wheezy-raspbian.img of=/dev/X
AGGIUNTA IP di RETE:
Modifica di /etc/network/interface di Raspbian
iface eth0 inet static
address 192.168.0.10
netmask 255.255.255.0
gateway 192.168.0.1
broadcast 192.168.0.0
RAGGIUNGIAMO IL RASPBERRY:
- Configurazione ip sul pc locale
- Accensione del Raspberry
- Collegamento al Raspberry via SSH
PRIME CONFIGURAZIONI:
# raspi-config
MA CHE ASPETTO HA STA RASPBIAN ?
- utilizziamo un server VNC:
- ci colleghiamo al Raspberry via ssh
- # apt-get install tightvncserver
- $ tightvncserver :1 -geometry 800x600
- dal pc remoto utilizziamo un client vnc
- # apt-get install xtightvncwiever
- $ xtightvncwiever 192.168.0.10:1
MA CHE ASPETTO HA STA RASPBIAN ?
QUARTO INGREDIENTE: Open Media Vault
DEFINIZIONE
OpenMediaVault is the next generation network attached
storage (NAS) solution based on Debian Linux. It contains
services like SSH, (S)FTP, SMB/CIFS, DAAP media server,
RSync, BitTorrent client and many more. Thanks to the
modular design of the framework it can be enhanced via
plugins.
Iso disponibili per cpu x86 a 32 e 64 bit
REPOSITORY DI OPENMEDIAVAULT e INSTALLAZIONE
Aggiungiamo i repo nel /etc/apt/sources.list
deb http://packages.omv-plugins.org fedaykin main
deb http://packages.omv-plugins.org fedaykin-armhf main
apt-get update
NO_PUBKEY 68EA3C673512CBCF
Prendere la chiave con
wget -O - http://packages.omv-plugins.org/omv-plugins.pub|apt-key add -
apt-get update
apt-get install openmediavault
TRUBLESHOOTING
Si sono verificati degli errori nell'elaborazione:
tftpd-hpa
openmediavault
E: Sub-process /usr/bin/dpkg returned an error code (1)
Modificare il file /etc/default/tftpd-hpa, ultima riga, in
questo modo:
TFTP_OPTIONS="--secure –ipv4"
apt-get install openmediavault
CONFIGURAZIONE DI OPENMEDIAVAULT
Browser, ip del NAS
admin
openmediavault
BUONA
CONFIGURAZIONE !
CONFIGURAZIONE SAMBA on OMV web interface
- Impostazioni: Gruppo di lavoro
- Condivisioni: Nome Condivisione
Cartella condivisa
Vari parametri
SAMBA on OMV
LATO CLIENT:
- usare il classico file manager
SAMBA on OMV TROUBLESHOOTING
LATO CLIENT
- Cotrollare /etc/samba/smb.conf
CONFIGURAZIONE NFS on OMV web interface AND
TROUBLESHOOTING
- Impostazioni: Abilitare NFS
- Condivisioni: Risorsa Condivisa
Range IP
Permessi
E in più.....
CONFIGURAZIONE NFS on OMV web interface AND
TROUBLESHOOTING
Lato Raspberry-OMV:
- installare rpcbind
- controllare /etc/default/nfs-common
NEED_IDMAPD=yes
NEED_GSSD=no
- controllare /etc/default/nfs-kernel-server
NEED_SVCGSSD=no
- controllare /etc/exports
sostituire ro con rw
- i servizi NFS non partono in automatico
/etc/init.d/nfs-common start
/etc/init.d/nfs-kernel-server start
/etc/init.d/rpcbind start
- NFS in automatico
update-rc.d rpcbind enable && update-rc.d nfs-common enable
CONFIGURAZIONE NFS on OMV web interface AND
TROUBLESHOOTING
Lato Client:
- installare nfs-common
- controllare /etc/default/nfs-common
NEED_IDMAPD=yes
- controllare le risorse “exportate” del NAS
showmount -e 192.168.0.10
- creare la directory in cui montare la risorsa remota
mkdir /home/nfs
- montiamo staticamente la risorsa condivisa sul NAS
mount -t nfs4 -o _netdev,hard,intr 192.168.0.10:/ home/nfs
Grazie per
l'attenzione e buon
Raspberry a tutti !
www.imolug.org
http://www.imolug.org/MailingList
https://www.facebook.com/ImoLUG