|
Edited by angeloD at Sat Nov 29, 2014 17:27
I wanted to build a NAS using my BananaPi, I tried BanaNAS but it did not boot correctly on my one, additionally the OpenMediaVault guys strongly advise NOT to run it on a flash drive (because of the multiple writes that, in the long run will destroy the medium).
So I decided to make one myself based on Bananian (BanaNAS is based on Raspian lift), addressing (or at least trying to address) at the same time the wearing of the flash drive. This is how I made it:
1. After the boot find the ip of the machineor for headless installs, on a machine on the same network- nmap -n -sP 192.168.0.0/24
Copy the Code 2. ssh to the ip found: root@ip, password pi
3. run bananian-config
4. To switch off the blinking green led, add the line:- echo none > /sys/class/leds/green\:ph24\:led1/trigger
Copy the Code to the /etc/rc.local file.
5. Set a fixed ip, edit the file /etc/network/interfaces- # static ip configuration
- iface eth0 inet static
- address 192.168.0.199
- netmask 255.255.255.0
- gateway 192.168.0.1
Copy the Code 6. install openmediavault- echo "deb http://packages.openmediavault.org/public kralizec main" > /etc/apt/sources.list.d/openmediavault.list
- apt-get update
- apt-get install openmediavault-keyring postfix
- apt-get update
- apt-get install php-apc
- apt-get install openmediavault
- omv-initsystem
- shutdown -r now
Copy the Code 7. ssh is now disabled, access the web interface, from a browser
User: admin
PW: openmediavault
8. Add DNS server in System/Network/DNS Server to allow name resolution
9. add extras repository- echo "deb http://packages.omv-extras.org/debian/ kralizec main" >> /etc/apt/sources.list.d/omv-extras-org-kralizec.list
- apt-get update
- apt-get install openmediavault-omvextrasorg
- apt-get update
Copy the Code 10. Generate, in OMV a certificate to enable https.
11. Switch off the usage of swap filesystem12. Switch off journaling in root filesystem, remove the SD from the banana, from another machine
- tune4fs -O ^has_journal /dev/...
Copy the Code 13. Use /var/log in tmpfs (taken from https://www.debian-administratio ... _transient_/var/log)
Create the file /etc/init.d/transientlog with the following content:Make it executable and insert as service:- chmod a+x /etc/init.d/transientlog
- insserv transientlog
Copy the Code As suggested (and indicated in the original page), optionally create a file "transientlogCron"
with this content:- #!/bin/sh
- [ -x /etc/init.d/transientlog ] || exit 0
- [ -f /var/lock/transientlog.lock ] || exit 0
- /etc/init.d/transientlog reload
Copy the Code make it executable, chmod +x and move it in the /etc/cron.daily folder.
Enjoy now your OMV NAS.... |
|