Code Monkey home page Code Monkey logo

zeus-nas's Introduction

zeus-nas

Scripts, how-to, articles to configure zeus, etc...

Features:

  • Samba - windows share
  • Serviio + serviio web console - DLNA server
  • transmission - torrents
  • Crashplan - offsite backups
  • Direct Connect with NCDC

System:

  • Hardware
  • vivid kernel on ubuntu 14.04
  • Read-only root file system locate on USB Flash drive
  • NAS disk consolidation by aufs
  • HDD S.M.A.R.T Check
  • System emails via Gmail and sSMTP
  • UPS
  • Webmin - web config
  • NewRelic for server monitoring

How to:

  • Add a HDD
  • How to remove duplicates

Hardware

http://n40l.wikia.com/wiki/HP_MicroServer_N40L_Wiki

http://homeservershow.com/forums/index.php?/topic/3506-more-interesting-microserver-links/

vivid kernel on ubuntu 14.04

apt-get update
apt-get upgrade
apt-get install --install-recommends linux-generic-lts-vivid 

Read-only root file system

Original artticle from: https://help.ubuntu.com/community/aufsRootFileSystemOnUsbFlash

for kernels >= 3.18 add overlay

for kernels < 3.18 add overlayfs

to \etc\initramfs-tools\modules

apt-get install aufs-tools

Copy root-ro file into /etc/initramfs-tools/scripts/init-bottom

chmod 0755 root-ro
update-initramfs -u 

Remount root (/mnt/root-ro) scripts:

/usr/bin/remountrw
/usr/bin/remountro

You can chroot to the /mnt/root-ro to install updates

NAS disk consolidation by aufs

/etc/fstab

aufs manual: http://aufs.sourceforge.net/aufs3/man.html

can be replaced by mergefs (user mode/fuse)

apt-get install libfuse-dev libattr1-dev pandoc git -y
git clone https://github.com/trapexit/mergerfs.git
cd mergerfs
make
make install
nano /etc/fstab

/mnt/data/* /storage fuse.mergerfs defaults,allow_other 0 0

transmission - torrents

apt-get install transmission-daemon
service transmission-daemon stop
nano /etc/transmission-daemon/settings.json

Crashplan - offsite backups

http://support.code42.com/CrashPlan/Latest/Configuring/Using_CrashPlan_On_A_Headless_Computer

http://support.code42.com/CrashPlan/Latest/Configuring/Using_CrashPlan_On_A_Headless_Computer_Version_4.2_And_Earlier

System emails via Gmail and sSMTP

apt-get install ssmtp
nano /etc/ssmtp/ssmtp.conf
nano /etc/ssmtp/revaliases

UPS

apt-get install apcupsd
nano /etc/apcupsd/apcupsd.conf

UPSNAME BX650CI UPSCABLE usb UPSTYPE usb STATFILE /media/nas/logs/apcupsd.status

nano /etc/default/apcupsd

ISCONFIGURED=yes

Start:

/etc/init.d/apcupsd restart

Status:

apcaccess status

Webmin - web config

apt-get install webmin

HDD S.M.A.R.T Check

apt-get install smartmontools

Enable S.M.A.R.T on a HDD

smartctl -s on -d ata /dev/sdX
nano /etc/smartd.conf

/dev/sda -H -s (O/../../4/02|L/../../4/04|C/../../4/06) -d sat -m [email protected]

/dev/sdb -H -s (O/../../4/02|L/../../4/04|C/../../4/06) -d sat -m [email protected]

/dev/sdc -H -s (O/../../4/02|L/../../4/04|C/../../4/06) -d sat -m [email protected]

nano /etc/default/smartmontools

start_smartd=yes

Restart:

/etc/init.d/smartmontools restart

Samba - windows share

apt-get install samba smbfs
mv /etc/samba/smb.conf /etc/samba/smb.conf.orig
nano /etc/samba/smb.conf

Serviio + serviio web console - DLNA server

Java 8 is required to run latest serviio

add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer

Install latest ffmpeg

sudo add-apt-repository ppa:kirillshkrogalev/ffmpeg-next
sudo apt-get update
sudo apt-get install ffmpeg

WebUI: https://github.com/SwoopX/Web-UI-for-Serviio/tree/Serviio-1.5

Add a HDD

apt-get install parted gdisk
parted -a optimal /dev/sdb
GNU Parted 2.3
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) mklabel gpt 
(parted) mkpart primary 1 -1
(parted) align-check                                                      
alignment type(min/opt)  [optimal]/minimal? optimal                       
Partition number? 1                                                       
1 aligned
(parted) quit

Using mkfs -t ext4 -N iNumberOfINodes /dev/XdY where iNumberOfINodes is a 32-bit number so the maximum possible number of inodes on any ext2/3/4 file system is 2^32-1, or 4,294,967,295 (~4 billion).

mkfs.ext4 -m 0 -N 1294967295 /dev/sdb1

mkdir /media/diskN
mkfs.ext4 -m 0 -T largefile4 /dev/sdb1
blkid
nano /etc/fstab

How to remove duplicates

Replace duplicates by hardlinks:

apt-get install fdupes
fdupes -r -L /media/nas

Direct Connect with NCDC

http://blog.kriswema.de/2012/12/direct-connect-with-ncdc.html

zeus-nas's People

Contributors

kwull avatar

Stargazers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.